lkml.org 
[lkml]   [2020]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] btrfs: Replace kmalloc with kzalloc in the error message
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.

\
 
 \ /
  Last update: 2020-05-29 15:07    [W:0.065 / U:4.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site