From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbdJDTok (ORCPT ); Wed, 4 Oct 2017 15:44:40 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33972 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbdJDToi (ORCPT ); Wed, 4 Oct 2017 15:44:38 -0400 X-Google-Smtp-Source: AOwi7QB4PtthSEoyJaP9VLCNI5rtWCfp+FM+ULSSmgwMxI8lB0Z/GLeAIkG9VejoPRCNJyqNE7f09g== Date: Wed, 4 Oct 2017 21:44:32 +0200 From: Alexander Sverdlin To: SF Markus Elfring Cc: linux-cris-kernel@axis.com, Boris Brezillon , Gregory Clement , Jesper Nilsson , Krzysztof Halasa , Mikael Starvik , Neil Armstrong , Shawn Guo , Tony Lindgren , Vladimir Zapolskiy , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/5] cris: nand: Delete an error message for a failed memory allocation in crisv32_nand_flash_probe() Message-Id: <20171004214432.20833a0ff3b9c8fdced2ebaa@gmail.com> In-Reply-To: <92a95fe3-5b8d-5dd9-a7bf-131a999e74c6@users.sourceforge.net> References: <92a95fe3-5b8d-5dd9-a7bf-131a999e74c6@users.sourceforge.net> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Markus, On Wed, 4 Oct 2017 20:45:14 +0200 SF Markus Elfring wrote: > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. what exactly has the software detected? I cannot find, how this error is reported otherwise, it seems to me that the message is not that superflous. The patches 2..4 look to me as an exercise without any practical meaning. Indeed, that's not how new code should be posted, but if we start rewriting all the legacy code, this will produce huge and completely unnecessary patch traffic. > Signed-off-by: Markus Elfring > --- > arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 -- > arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c > index 925a98eb6d68..259aa1f46fbe 100644 > --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c > +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c > @@ -136,8 +136,6 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) > /* Allocate memory for MTD device structure and private data */ > wrapper = kzalloc(sizeof(struct mtd_info_wrapper), GFP_KERNEL); > if (!wrapper) { > - printk(KERN_ERR "Unable to allocate CRISv32 NAND MTD " > - "device structure.\n"); > err = -ENOMEM; > return NULL; > } > diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c > index 53b56a429dde..1baf16ee74e8 100644 > --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c > +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c > @@ -111,8 +111,6 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) > /* Allocate memory for MTD device structure and private data */ > wrapper = kzalloc(sizeof(struct mtd_info_wrapper), GFP_KERNEL); > if (!wrapper) { > - printk(KERN_ERR "Unable to allocate CRISv32 NAND MTD " > - "device structure.\n"); > err = -ENOMEM; > return NULL; > } -- Alexander Sverdlin.