Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5169235ybi; Tue, 30 Jul 2019 15:17:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4vRbYH5mb5yElD9mhM+ubLLp9rBPZHEJnYLdXgu5vg0WqiV/8282gVWygzX89G1Oz0Mfi X-Received: by 2002:a62:754d:: with SMTP id q74mr42858143pfc.211.1564525065796; Tue, 30 Jul 2019 15:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564525065; cv=none; d=google.com; s=arc-20160816; b=TgfF/cqvMpwaHQUrF1DZVe/bZGUkH8yzwEo08Kc1hr0SsaqNWZ0RaAEY9TWd2XmcVd +m+OA7R5n/mWgMxP14BducaukGvHZjitq5DYhJ1mHOX0L318m6PkHlBCQNBAxbnZ9mof 02TMRuYTCD45INKFy/yzi33VjE1lpvedD9df/1kH5Yz9u9bN2nd1FtZ0JWZpQxRSbpXL n9bUanIsjImCp8mvKTmEfvXxrW9yWFqEvhpTWyUAJqd9T4vLP3yAt9sIxpaY4VcopwRT CFZSeJAwyDLBkEKau9bqr7lOXQ0vpgRmuDXquu7uaVPfP5PWXUE588t1iggnp6MbyUN+ vd8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PVgHHfw8283w1UDYfT80DWnZOItPSgOPx68g/r5d7hQ=; b=jK6uB1H1mcmAQHEPYKC+U/uUSOMp2M6lU0/F5jQR3qtq7puy+Hkuj0wP7fgY/Q0mU+ G5nHCNJEbGvpU6pnKuS552EHTzZsyXk5x2YRQVUv1GtdpkmC53o35fNGfiOZ0lqLzPpp RnPXzPR82uT14uSqXyOwS1XUP+JeUvCNH3iL2dqTPJMDQ5iuYq6KGbkh32Dv/rLrKBBz WB1B0HzLvZSFUhfi5p4X12xhGF2k1ijrxiypqDkNyy0its7OygvQ/kzvo0yWeQc8FV4w CJMlLkfWBEvMYzmQgH2y5RAAhOG60gffb/5JyD6uueD+uE/ieAbTK7SGA1/tEVyqQGyt 6mkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UXb1XEzw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si29329834plh.59.2019.07.30.15.17.31; Tue, 30 Jul 2019 15:17:45 -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=fail header.i=@gmail.com header.s=20161025 header.b=UXb1XEzw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbfG3SlZ (ORCPT + 99 others); Tue, 30 Jul 2019 14:41:25 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40845 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfG3SlY (ORCPT ); Tue, 30 Jul 2019 14:41:24 -0400 Received: by mail-pg1-f194.google.com with SMTP id w10so30516900pgj.7; Tue, 30 Jul 2019 11:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PVgHHfw8283w1UDYfT80DWnZOItPSgOPx68g/r5d7hQ=; b=UXb1XEzwQ4FhS7roeMM8Wx/ECYXxRVmaXou0vbqI/o/pifDl6IfTG8Y6vFJ225b2i6 f6Wlizk14eGiE7TQSYxqk5WuFrEGVXZVfWaJX4am2gWLxTpCq7BsYPFt/5LW12ZIGm3c FvsEZbYBKNFuwh3zAJA38tslp1lajzKddbZl8g7cs2JL1ERCtJRv8MebhY6SZJkNpxdu U40Ib5WYNBSJB+D79Rzj/i9xpMKItghTR2nG1fIeLy9Ruwios0URvQNvOflz9kfSTqNT 2ZogTW52qmeO4A+m+y91msP76RF0/TbICGWUVWiXYALyBwvsGjOzBeeAQ1+r6jyAcHWA ETEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=PVgHHfw8283w1UDYfT80DWnZOItPSgOPx68g/r5d7hQ=; b=SRhL+n6AAxtJuLlYukiM5RJLPXzZO03mLlVIuxPDtxJFug2TG13/ka1J95GGpnR778 ab0sZK4Z5VUcMalE+KZYh+cq94XCUaW3uK2Ef03lPh4AVDWzKRE2LllH/MvWnRV1LyFg 886RF0caDol/QggV2dkj34+v8ypbYAGXey30/47luBIKmh1W4+xx+xCUe3QKSZrNV+ws vkeFYFIfyRiMOkqjLB/PRDeSrBrEIMIEhUxxxPb5qjdyHL0ru6TjJVgYb5umQ53OmoKI i5DpdRF+DWEz28ATJBxoy57NIDq3DFKSNAZpZXrohl1p8giN5hC9NihUFeWu2F5ydW+C TwEw== X-Gm-Message-State: APjAAAWswsORfaMs2GY86D20023yjdptLLJSeqkF0zFg3FT+DpeJsJof J5vzNG2C5JMl+LmEKvsoiTE= X-Received: by 2002:a65:5c4b:: with SMTP id v11mr67619457pgr.62.1564512084206; Tue, 30 Jul 2019 11:41:24 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id z6sm36592223pgk.18.2019.07.30.11.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2019 11:41:23 -0700 (PDT) Date: Tue, 30 Jul 2019 11:41:21 -0700 From: Guenter Roeck To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Wim Van Sebroeck , linux-watchdog@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH v6 48/57] watchdog: Remove dev_err() usage after platform_get_irq() Message-ID: <20190730184121.GA32293@roeck-us.net> References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-49-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730181557.90391-49-swboyd@chromium.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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:48AM -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). > > Cc: Wim Van Sebroeck > Cc: Guenter Roeck > Cc: linux-watchdog@vger.kernel.org > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd Reviewed-by: Guenter Roeck > --- > > Please apply directly to subsystem trees > > drivers/watchdog/sprd_wdt.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c > index edba4e278685..0bb17b046140 100644 > --- a/drivers/watchdog/sprd_wdt.c > +++ b/drivers/watchdog/sprd_wdt.c > @@ -284,10 +284,8 @@ static int sprd_wdt_probe(struct platform_device *pdev) > } > > wdt->irq = platform_get_irq(pdev, 0); > - if (wdt->irq < 0) { > - dev_err(dev, "failed to get IRQ resource\n"); > + if (wdt->irq < 0) > return wdt->irq; > - } > > ret = devm_request_irq(dev, wdt->irq, sprd_wdt_isr, IRQF_NO_SUSPEND, > "sprd-wdt", (void *)wdt); > -- > Sent by a computer through tubes >