Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5104345ybi; Tue, 30 Jul 2019 13:54:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrj7c9mqCZr8YXEbBVhwlCICJ5na+1qXfTHIpQD3hyAA8foguSZxE8eitQuU9Fhw8OWhCF X-Received: by 2002:a17:902:b415:: with SMTP id x21mr32717743plr.287.1564520046610; Tue, 30 Jul 2019 13:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564520046; cv=none; d=google.com; s=arc-20160816; b=fo/dqIXuSNZLUyuL9jSC9AWd86+QbTYxp8hcUNkW0oOG9adjlfjgmQHyUcm44Rm4H2 jbox1xYujl+fCZO6hWrCQdImbkiWQQ3tfhjH9TYg/4Db0PxKW3q2Ge8e0g3G4tXWNG2d N7npMRL2KQ7NjmZAiQk1rOvxPP8qb63sOmRmnq+2jccLgNHVP4yQ7orSQDOjGxGbtdE7 KaCtIxal7itA89eG5KJh+HiA0i1HJEj8GCGn81t7zTP1NuoO6ZBbfmyNfw3DfGaa7JbD BdKhqdKzVUZ8VRIl0C7J32hadHlwnb0XGgeFS7BUSI+v1HDInkb6mdUMgl2VXCAGewBL Szug== 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=5fo9xoU+yYD5Z8uf9SUR2uKYmF1uk/rKV9Lb3Z9ueEo=; b=dX+FOsP+qKGhHsxjbOq0pgdCY52Q1eCIeGd4MM3tp3MIBfItEJEz7Ox40BXKfUMD1N ZWIA2U5PIFoFqf1ol2EN/n6Yw/aVfz+Px4tTKL/1YFChUwm73oX+k61GQpKHivDNXc+a em1JIok4PPSpQMSIpSw5oe4QHP+5CuOns2rA284j550KkMIIdsGXttEJsI9CGkhtW8/t jkrWtxfuh5rcVXRwWkoS4ctn1VFDvZQMImitVPRkAsiNodS5A288CizM+c866qN64Rfh b/QUhLNmHSJAFrKDYwuWGMK6EvwrPv7i5mfM0HwRUdyKpYADcjDL3zO6qnmxCbZ0x+hu rthA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dA64UpA8; 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 5si29181897plx.200.2019.07.30.13.53.50; Tue, 30 Jul 2019 13:54:06 -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=dA64UpA8; 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 S2388207AbfG3SQx (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:53 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:35724 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388099AbfG3SQj (ORCPT ); Tue, 30 Jul 2019 14:16:39 -0400 Received: by mail-pf1-f196.google.com with SMTP id u14so30283478pfn.2 for ; Tue, 30 Jul 2019 11:16:38 -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=5fo9xoU+yYD5Z8uf9SUR2uKYmF1uk/rKV9Lb3Z9ueEo=; b=dA64UpA8tj7mLl9viR5GgcvrXC4eb0BxunWdCwwdzT4DlyEI8uQSpupsoCEHzNj+dr dPuE+Wh+6zGMN7haRIdBFGXQib01S9+ge8IdTNOyfFRCKueetaGUY/Q2tME3YBHKhIGv 5sZTtfUIhT4IQ0D9MEWfOmjNzPki1oPQkI7go= 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=5fo9xoU+yYD5Z8uf9SUR2uKYmF1uk/rKV9Lb3Z9ueEo=; b=lh4GL5j8ej6rtk/V/vV5eXX8ZivfrpSRpuaeeESY04AUSssacUQenBHYPOLJ4gZzpN pXXbYrHlGmqzNubm4XDqBXuQe+KJKekyEeS4YscjDAjkDrGfD9WH3NUfUCfIOtD3O8bG ftZKfYBhGzREozs5atdAABZUR+BN0Wz0wt20bEY5lsgSqKVcLtpuyRJoW4HvcOShKgkf geJvL7LqS1Ol7eBESFuA31iJ343HgKaky5i66+NnqH/Wli9w2YIL0sUzHgj03QgD3uun g8nOj+Zrb4zqRwjyBdj+V2GYbCD+hMknP6jUCxLE61EHbBLlrXSeFHhyO6CzopuWY+he rI6A== X-Gm-Message-State: APjAAAU9vhiCE2ZZVvZLO6egXqaWyG61rUCSDzKh6AWhsdYIIVjDXnCJ hRqlp9bMafcSlNKkk/Jg23m70VSX+6ZHew== X-Received: by 2002:a62:5487:: with SMTP id i129mr44440965pfb.69.1564510598243; Tue, 30 Jul 2019 11:16:38 -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.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:37 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH v6 48/57] watchdog: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:48 -0700 Message-Id: <20190730181557.90391-49-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: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- 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