[PATCH] sparc64: Remove redundant __GFP_NOWARN

Qianfeng Rong posted 1 patch 1 month, 3 weeks ago
arch/sparc/kernel/adi_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] sparc64: Remove redundant __GFP_NOWARN
Posted by Qianfeng Rong 1 month, 3 weeks ago
Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
GFP_NOWAIT implicitly include __GFP_NOWARN.

Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
`GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
redundant flags across subsystems.

No functional changes.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 arch/sparc/kernel/adi_64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/adi_64.c b/arch/sparc/kernel/adi_64.c
index e0e4fc527b24..18036a43cf56 100644
--- a/arch/sparc/kernel/adi_64.c
+++ b/arch/sparc/kernel/adi_64.c
@@ -202,7 +202,7 @@ static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
 
 	} else {
 		size = sizeof(tag_storage_desc_t)*max_desc;
-		mm->context.tag_store = kzalloc(size, GFP_NOWAIT|__GFP_NOWARN);
+		mm->context.tag_store = kzalloc(size, GFP_NOWAIT);
 		if (mm->context.tag_store == NULL) {
 			tag_desc = NULL;
 			goto out;
@@ -281,7 +281,7 @@ static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
 		size = (size + (PAGE_SIZE-adi_blksize()))/PAGE_SIZE;
 		size = size * PAGE_SIZE;
 	}
-	tags = kzalloc(size, GFP_NOWAIT|__GFP_NOWARN);
+	tags = kzalloc(size, GFP_NOWAIT);
 	if (tags == NULL) {
 		tag_desc->tag_users = 0;
 		tag_desc = NULL;
-- 
2.34.1
Re: [PATCH] sparc64: Remove redundant __GFP_NOWARN
Posted by Andreas Larsson 2 weeks, 1 day ago
On 2025-08-09 16:33, Qianfeng Rong wrote:
> Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
> GFP_NOWAIT implicitly include __GFP_NOWARN.
> 
> Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
> `GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
> redundant flags across subsystems.
> 
> No functional changes.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
>  arch/sparc/kernel/adi_64.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/kernel/adi_64.c b/arch/sparc/kernel/adi_64.c
> index e0e4fc527b24..18036a43cf56 100644
> --- a/arch/sparc/kernel/adi_64.c
> +++ b/arch/sparc/kernel/adi_64.c
> @@ -202,7 +202,7 @@ static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
>  
>  	} else {
>  		size = sizeof(tag_storage_desc_t)*max_desc;
> -		mm->context.tag_store = kzalloc(size, GFP_NOWAIT|__GFP_NOWARN);
> +		mm->context.tag_store = kzalloc(size, GFP_NOWAIT);
>  		if (mm->context.tag_store == NULL) {
>  			tag_desc = NULL;
>  			goto out;
> @@ -281,7 +281,7 @@ static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
>  		size = (size + (PAGE_SIZE-adi_blksize()))/PAGE_SIZE;
>  		size = size * PAGE_SIZE;
>  	}
> -	tags = kzalloc(size, GFP_NOWAIT|__GFP_NOWARN);
> +	tags = kzalloc(size, GFP_NOWAIT);
>  	if (tags == NULL) {
>  		tag_desc->tag_users = 0;
>  		tag_desc = NULL;

Reviewed-by: Andreas Larsson <andreas@gaisler.com>

Picking this up to my for-next.

Thanks,
Andreas