[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-btrfs
Subject:    Re: [PATCH] btrfs: Replace kmalloc with kzalloc in the error message
From:       David Sterba <dsterba () suse ! cz>
Date:       2020-05-29 13:05:46
Message-ID: 20200529130546.GR18421 () twin ! jikos ! cz
[Download RAW message or body]

On Thu, May 28, 2020 at 07:03:45PM -0700, Joe Perches wrote:
> On Fri, 2020-05-29 at 09:00 +0800, Yi Wang wrote:
> > From: Liao Pingfang <liao.pingfang@zte.com.cn>
> > 
> > Use kzalloc instead of kmalloc in the error message according to
> > the previous kzalloc() call.
> []
> > diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
> []
> > @@ -632,7 +632,7 @@ static int btrfsic_process_superblock(struct btrfsic_state *state,
> >  
> >  	selected_super = kzalloc(sizeof(*selected_super), GFP_NOFS);
> >  	if (NULL == selected_super) {
> > -		pr_info("btrfsic: error, kmalloc failed!\n");
> > +		pr_info("btrfsic: error, kzalloc failed!\n");
> 
> As there is a dump_stack() done on memory allocation
> failures, these messages might as well be deleted instead.

I wouldn't bother changing the strings, removing them entirely sounds
like a better idea to me.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic