Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp527875ybm; Fri, 29 May 2020 06:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaBLw5v4LCJqc3KE5ebXOLVNHri4OrnXCmyyXWshE3x6hCBNrCHZXxbJnkGOVF6pyqznOq X-Received: by 2002:a50:d1c4:: with SMTP id i4mr8118768edg.344.1590757860559; Fri, 29 May 2020 06:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590757860; cv=none; d=google.com; s=arc-20160816; b=cvnB9tRSaB/AB46wedtA2KfRfQF2e4/tH8/+JWNUJ4tgEP0hd4tnkQ6xx6r6T1qFhk OetO4FdQ/KzkAvCOxHlNZwUPge8BlfLWMD+9YFmvLCT51ClLiW7xsKW6beaSGS4TEKcb 8PvAy9TK2OjQi6wYFmYwCV5RSUm32SIBWYM2Th4Oe9odkxClmiV+1b9K10254eQD32S/ 69zE8jyNF6zLMfPbtqMzIC/xd8A96GJgZEumg3F48NyGYa2jnjov7QYd8JU/kKc3bHns gwvFcAZI5lF6G9Um/j9snokYGeyqoUnTigXnK0wXpPayKa5XcL9/r1QcFWXP6ft2YyP3 deOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=+FLySY0rXe3C6bt6bCdIqz1wBpyG7cQhZa0aOImUato=; b=XeSVC+diZ1s+zSRddwscEk1izuZIwzXuTBbOMKswlZS0jI7mTuuvIO4dOvnkqItd62 7eCcHPdtdhGjAjeh1ruOSx7lY0t/ln9/2CSLkGsO2GGeL0lczyXnMMtlVnOqdkDq6Pmq HpveZ7JVL4VuEuuXW8cufmayHtONgorDsXDPXR0VnMDWTDzV65nnnZcWwSO6/SNZma5y WTvsY6kwfjZNIAKvbuX19dCvctUnDn8Hygu8Rjanlwn7cSSPh8yOqStRo6ddeZKEFWt6 YPcZErKPTXnYQdcZ8hcyZz3An0COroj8ypuJ0pijgnX506ce4dYDinvzdoO4N0oIk2e4 Bkqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si5369754edq.605.2020.05.29.06.10.36; Fri, 29 May 2020 06:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbgE2NFy (ORCPT + 99 others); Fri, 29 May 2020 09:05:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:40368 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbgE2NFx (ORCPT ); Fri, 29 May 2020 09:05:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 97BD3AE0F; Fri, 29 May 2020 13:05:51 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 33F0CDA7BD; Fri, 29 May 2020 15:05:46 +0200 (CEST) Date: Fri, 29 May 2020 15:05:46 +0200 From: David Sterba To: Joe Perches Cc: Yi Wang , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.liang82@zte.com.cn, Liao Pingfang Subject: Re: [PATCH] btrfs: Replace kmalloc with kzalloc in the error message Message-ID: <20200529130546.GR18421@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Joe Perches , Yi Wang , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.liang82@zte.com.cn, Liao Pingfang References: <1590714057-15468-1-git-send-email-wang.yi59@zte.com.cn> <5418df56f217437bd33c4cb70098db29c177d5b3.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5418df56f217437bd33c4cb70098db29c177d5b3.camel@perches.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > 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.