Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5107117ybi; Tue, 30 Jul 2019 13:57:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5gYamC+cBzpHCICv9DAJqxL4iFk4/VxNZ4xBIHCvg4bFinwak9CUwADV4RjsZyv/ZG1s1 X-Received: by 2002:a17:90a:9f0b:: with SMTP id n11mr79538654pjp.98.1564520274703; Tue, 30 Jul 2019 13:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564520274; cv=none; d=google.com; s=arc-20160816; b=d7tNY2DkUbzduF5nzKyXqmxt2mO0ZWejgpRYdcciqbmd8AcstZVA46JX+PSVNlHQUO VfCNcxrgHdXSpzPkqjJIfPhL91XU/vWr95FEFI9l9733KKOiBcB+JN9fVCX/sNQxdZ+g vT23YYsQplfRHER6vxQJ9iJ8CxQVZ++mvHFYe2/a1fGBJOiyy3f4RSwVT4NbmjPmtQhZ TbS9Evk48Smi/m/uPlPM3YFsLaulKCjyL4WtBRw1COltmyir0kDYaLYUhjz++hNu9e0e eovyWD04ZhFn0IAAWT5EDJGQ1KKZpRW68GeYdgX+aRb7bD5smneNzEtvxzCaD1WJcu13 JrSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=somlVG7aoLRTDNe0zC2Drx3Tdp0wP3Lq13vd9q8TT1M=; b=zt7xX64RUAGx096DzDEshh+/gTKcwyNo+pPDxQ6OJkuZApWYl11e5h2Z2xGAcd97+R kC4+6BDXUZeRJYQn9l+LLt5NWydqWzRks87kBKLa6V+JRpAjhiWZkJtO/GqPiUswedUf GLXoTjjmrAELyWsKKDteb6eL8OaeZOW5bonZVQUSrvuPqgOU93bTpxJ3FtcgJAyI8d3g U/79jO8SEM7ewIuEkLIKRz/wJYk8e7Dd1nQDT2ylnhxkYCFY4f9uxtYuRJJhBdtxe2TK FBUS/ulNFIppFLR07VCqhmSnOXbRHnBVlQzXUati643S7TFDbhRjV3VbD7Oi6anoTHdo qH8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EBEboaQY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si31245118pfc.210.2019.07.30.13.57.39; Tue, 30 Jul 2019 13:57:54 -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; dkim=pass header.i=@chromium.org header.s=google header.b=EBEboaQY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729246AbfG3SSv (ORCPT + 99 others); Tue, 30 Jul 2019 14:18:51 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43478 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388001AbfG3SQ1 (ORCPT ); Tue, 30 Jul 2019 14:16:27 -0400 Received: by mail-pl1-f195.google.com with SMTP id 4so22221131pld.10 for ; Tue, 30 Jul 2019 11:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=somlVG7aoLRTDNe0zC2Drx3Tdp0wP3Lq13vd9q8TT1M=; b=EBEboaQYV9O8iIM6zMNzpv8mUeY2ChFjVpMiAksAcInisqCt/i5VHf4CkWOv3Rh05j yinJoKRluXbD7HBvDWEQo53BlbwCh2uTqrm+6a6sZG9Y6cNKub2X27OWEDNdHzsgsnVW VNo4pbLsbAEyIPZpB9FD2B5bD6i3XHgy9nCsU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=somlVG7aoLRTDNe0zC2Drx3Tdp0wP3Lq13vd9q8TT1M=; b=r0N4rXC4xF0TvXUSdS7MmWk7Edev+w0rUUZuFpyFzIQs6NIfPucylzJ86ft3iu5RuF Crj7nqDvB3uZExMhGqqPyLfqj37I9I+/uUix/3ubL1GJUgtzOhGJ5qZvrgQzqnO9dNF7 VlKSlzz24/YJXigGdQv14jfvA0MT1QCVetyKHxAwu3gRUzOajudEVUYQdxPdP2LVmWh7 AUOtopm+FqcjcUlPAKJXiuDEx5NRR5EZOK0Ad/HSV1757eeJK+JmAofYIjhV/wK9o6qe brieDOhmxnnifeXeMFEgL2FxtgIprv1pH9RUkFnrF3mTLYw1Lr4HWcz+UVKXguCmj/aY WAuw== X-Gm-Message-State: APjAAAU1AVqimEs7+iBS4PgFy80E0kOeLbN/A99UZqzwSX0ck/8mRWeX OdqjR43sPyYzZgW6uJ4xOTIjyJHlHBI+sg== X-Received: by 2002:a17:902:583:: with SMTP id f3mr115777543plf.137.1564510586981; Tue, 30 Jul 2019 11:16:26 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id g1sm106744083pgg.27.2019.07.30.11.16.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:26 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Linus Walleij , linux-gpio@vger.kernel.org, Greg Kroah-Hartman , Mika Westerberg , Andy Shevchenko Subject: [PATCH v6 34/57] pinctrl: intel: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:34 -0700 Message-Id: <20190730181557.90391-35-swboyd@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190730181557.90391-1-swboyd@chromium.org> References: <20190730181557.90391-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). 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