Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5113914ybi; Tue, 30 Jul 2019 14:05:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqww3FBYc3aSFpNcOC3L5egEVDKJvgla+lzoMST+0MAaYMv86PLqBW8U0GxVakxdcl07Z0kQ X-Received: by 2002:aa7:8201:: with SMTP id k1mr42629250pfi.97.1564520735265; Tue, 30 Jul 2019 14:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564520735; cv=none; d=google.com; s=arc-20160816; b=TM+bXTRACIp9YtlA+ckpCNgkSq9sgxGBQvHCWczliHx3dyYHCZnnOe5GX4bWOJn5V+ iyhenSR0tmh2rpTQdq3hmmKRe/NddC5cP3VGHLZoPPsd+8UabY+VdySqaCVpMdn4CWPA UbkBqgNM6BYwf4hr6ac7K5ls7jpF2z/nU1JSRvSQuWXlrC7Bo1pqDtHYQbvSAd07p93H 6QwyGx6o39hVBVPb61OBn2Jy+lUzdmHVmKEApTFOdiv1s7m8b50z8Ko/sdh31YwsAj1w a5pMZcdgxVEl1P6oQJ7i9+1+3M6fp1m0tGFdLBzlpUwzX27d8hRkmgDGakctUF4G8zkk T7jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Yh76m6+W30ZBPuyzITl6OpUSecn537TBGz9/ppE+IXM=; b=c84VG2CFyE8yqS2ckWLVG1n0Ew0Lm8jP311Ej6eM//Cf0o5aF1pXFgKr8wu1Jwwpz7 lZbYH83c4N7xnlwYBMYPPS13m7/WBhPwQIgR1N3h7QgTxLC7KqDxNPDXA/O1IlT1Bc/M PJPtwQ4iFUshf1LUz/PSwJgQeKXfr8id9ng5WX/TT1QyTVlNBBi4m4WVf5pqSpBdLotL Jm3fgheQGAp2Mo7JqLd/wVCzARaPeRXbf0W/Porhg7X/bYDM/ByK/HJziHsp2tU/MtD+ AcAsBURUfzB+EHd/HXH3DTC3ix2rX7mwDmplVZzWoiV9UifyF9f4Me7KJB3sIzNk5NWd 2+Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y62si4056304pgy.348.2019.07.30.14.05.18; Tue, 30 Jul 2019 14:05:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387594AbfG3Sc4 (ORCPT + 99 others); Tue, 30 Jul 2019 14:32:56 -0400 Received: from mga18.intel.com ([134.134.136.126]:50992 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387563AbfG3Scw (ORCPT ); Tue, 30 Jul 2019 14:32:52 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2019 11:32:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,327,1559545200"; d="scan'208";a="176911387" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.145]) by orsmga006.jf.intel.com with ESMTP; 30 Jul 2019 11:32:49 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hsWvX-0007II-UA; Tue, 30 Jul 2019 21:32:47 +0300 Date: Tue, 30 Jul 2019 21:32:47 +0300 From: Andy Shevchenko To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org, Greg Kroah-Hartman , Mika Westerberg Subject: Re: [PATCH v6 34/57] pinctrl: intel: Remove dev_err() usage after platform_get_irq() Message-ID: <20190730183247.GI23480@smile.fi.intel.com> References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-35-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730181557.90391-35-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:34AM -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). Also, per file, but I will do it myself when applying, thanks! > > Cc: Linus Walleij > Cc: linux-gpio@vger.kernel.org > Cc: Greg Kroah-Hartman > Cc: Mika Westerberg > Cc: Andy Shevchenko > Signed-off-by: Stephen Boyd > --- > > Please apply directly to subsystem trees > > drivers/pinctrl/intel/pinctrl-cherryview.c | 4 +--- > drivers/pinctrl/intel/pinctrl-intel.c | 4 +--- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c > index 03ec7a5d9d0b..cd4a69b4c5a8 100644 > --- a/drivers/pinctrl/intel/pinctrl-cherryview.c > +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c > @@ -1703,10 +1703,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev) > return PTR_ERR(pctrl->regs); > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "failed to get interrupt number\n"); > + if (irq < 0) > return irq; > - } > > pctrl->pctldesc = chv_pinctrl_desc; > pctrl->pctldesc.name = dev_name(&pdev->dev); > diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c > index a18d6eefe672..0487e8dc7654 100644 > --- a/drivers/pinctrl/intel/pinctrl-intel.c > +++ b/drivers/pinctrl/intel/pinctrl-intel.c > @@ -1354,10 +1354,8 @@ static int intel_pinctrl_probe(struct platform_device *pdev, > } > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "failed to get interrupt number\n"); > + if (irq < 0) > return irq; > - } > > ret = intel_pinctrl_pm_init(pctrl); > if (ret) > -- > Sent by a computer through tubes > -- With Best Regards, Andy Shevchenko