Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7455123ybi; Thu, 1 Aug 2019 08:25:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhgJBVV3JL6zpmTTK4dYBEcUbeO6ew0GhJ5GC+GlM15bj67jKjMAqmVkYQOzswM5kckThi X-Received: by 2002:a65:62cd:: with SMTP id m13mr8849360pgv.437.1564673149544; Thu, 01 Aug 2019 08:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564673149; cv=none; d=google.com; s=arc-20160816; b=vhrxHL636F+fjjpWwAWsAzDj3j6xcHDofabfKh3FoKPQjOefk4C+mqI5rJ37+THlG9 pHyGtGGeddBwoHNBLOWexjF5KwWw9ZoeIxptxPep4Ae/RL8x6rqAhrfscZv7qqpUHr24 77bVCoheeMfG1pnO12lxI26dtIDQK0Qt2OjOG22SpT432nPmPLItSitcLJiusI+Z/Uag /+M21fkUZbViHL2dzsQ/ZTYDKF00yfXobBva/pffkI7jJJ7mwgLc2ceWaq6pjB8/bVeq PmAdPfQWPx/dvBlBhJB3+OAKhzzOd80+vs+tjq2N9ycSYYL1z++OsDfFiaXTndYaFwId BnFg== 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=0R6H8UeejffezpbUhu2ODdPr1Vily6VCWbpRT/BUXmg=; b=PVDJmQqMd1wnvy1IFhGz9PcScJx0FTlSQgA6mevXaEFYtE03SNXTDyevTY27e/kqnA JtCKEzsGKU+jKVED+PiYfMBdxndn71CunqJBIL9AKYLP96CYA/dqQ5Nbaj/wWhwh1pER XPCAFiFQb8OMMVXynT8Y5GtLecm3rTRdUeONVFTBMcOHO0jJf7sAXIRwFHdhP1QegQbd GqrxqUWQBbl+8tUEvgPGOsICfvpmjwtsWgVHgwJ4J4sUuAuRUYeiJnUuswWh+bfSGkDh vN4P9VxFa05k93UWAg6wxPmxrK55PPvO89e9EVGVudR4RiSIAzQb+kyp3u+BkhWTl1XA yUJw== 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 w16si34864845pfi.31.2019.08.01.08.25.34; Thu, 01 Aug 2019 08:25:49 -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 S1730711AbfHAN53 (ORCPT + 99 others); Thu, 1 Aug 2019 09:57:29 -0400 Received: from mga03.intel.com ([134.134.136.65]:58926 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730524AbfHAN52 (ORCPT ); Thu, 1 Aug 2019 09:57:28 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 06:57:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,334,1559545200"; d="scan'208";a="196850046" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.145]) by fmsmga004.fm.intel.com with ESMTP; 01 Aug 2019 06:57:26 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1htBa8-0004H6-Av; Thu, 01 Aug 2019 16:57:24 +0300 Date: Thu, 1 Aug 2019 16:57:24 +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: <20190801135724.GX23480@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). Pushed to my review and testing queue, 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