From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35000C19759 for ; Thu, 1 Aug 2019 15:11:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EE7F206B8 for ; Thu, 1 Aug 2019 15:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732387AbfHAPLw (ORCPT ); Thu, 1 Aug 2019 11:11:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:21549 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727853AbfHAPLw (ORCPT ); Thu, 1 Aug 2019 11:11:52 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 08:11:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,334,1559545200"; d="scan'208";a="166936447" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.145]) by orsmga008.jf.intel.com with ESMTP; 01 Aug 2019 08:11:46 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1htCk4-0005Ax-Rf; Thu, 01 Aug 2019 18:11:44 +0300 Date: Thu, 1 Aug 2019 18:11:44 +0300 From: Andy Shevchenko To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Enric Balletbo i Serra , Hans de Goede , "Darren Hart (VMware)" , Roman Kiryanov , Vadim Pasternak Subject: Re: [PATCH v6 55/57] platform/x86: intel_int0002_vgpio: Remove dev_err() usage after platform_get_irq() Message-ID: <20190801151144.GZ23480@smile.fi.intel.com> References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-56-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730181557.90391-56-swboyd@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 30, 2019 at 11:15:55AM -0700, Stephen Boyd wrote: > We don't need dev_err() messages when platform_get_irq() fails now that > platform_get_irq() prints an error message itself when something goes > wrong. Let's remove these prints with a simple semantic patch. > > // > @@ > expression ret; > struct platform_device *E; > @@ > > ret = > ( > platform_get_irq(E, ...) > | > platform_get_irq_byname(E, ...) > ); > > if ( \( ret < 0 \| ret <= 0 \) ) > { > ( > -if (ret != -EPROBE_DEFER) > -{ ... > -dev_err(...); > -... } > | > ... > -dev_err(...); > ) > ... > } > // > > While we're here, remove braces on if statements that only have one > statement (manually). All 4 pushed to my review and testing queue, thanks! P.S. Please, consider Cc'ing PDx86 mailing list next time for contribution. Otherwise it misses our patchwork. > > Cc: Andy Shevchenko > Cc: Greg Kroah-Hartman > Cc: Enric Balletbo i Serra > Cc: Hans de Goede > Cc: "Darren Hart (VMware)" > Cc: Roman Kiryanov > Cc: Vadim Pasternak > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > > Please apply directly to subsystem trees > > drivers/platform/x86/intel_int0002_vgpio.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/platform/x86/intel_int0002_vgpio.c b/drivers/platform/x86/intel_int0002_vgpio.c > index d9542c661ddc..4f3f30152a27 100644 > --- a/drivers/platform/x86/intel_int0002_vgpio.c > +++ b/drivers/platform/x86/intel_int0002_vgpio.c > @@ -166,10 +166,8 @@ static int int0002_probe(struct platform_device *pdev) > return -ENODEV; > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(dev, "Error getting IRQ: %d\n", irq); > + if (irq < 0) > return irq; > - } > > chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); > if (!chip) > -- > Sent by a computer through tubes > -- With Best Regards, Andy Shevchenko