From patchwork Mon Aug 26 20:43:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 172199 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4862422ily; Mon, 26 Aug 2019 13:44:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMw9U20WkxB9HyG5mRgi+iMrqeRju0gpGsQ9Cpof4/Zzd8ZriOjA6ZBKN5VNsoKssCjWGB X-Received: by 2002:a62:db43:: with SMTP id f64mr23007231pfg.38.1566852283107; Mon, 26 Aug 2019 13:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566852283; cv=none; d=google.com; s=arc-20160816; b=yacvCoGkNPKgnbGl6VC7wIfTY67nVmlxEPT0/iWjhRqgh9962wqqimXMg31Lfxxtrb npEn4VaF2kH3vP/U+EngMairQ5TDG97vHhw/phy8B7Ngj4fa6GCzXxC9NgPAuP0ppMRn 13jCI89ybUQL08VLuYvHWY4vXlbr11RBAwu7woBiP/kqe63koO1DDnreCJtkeNF31iMq smRHDUCChDb/SlPhEfr5QM/Y5cojJqucGx9otfJIog0LGwxMnOp8uxT3yuxsQT5stYxo dnpZ2lPC84Ajp3PuBR5bP5DhXEuOqtc6tYTqYTSXvP/WeqyycqQtMmzCLTULvqDvorvQ fcyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Qsyqwo/7IzN3JSHEHiK8TRXncaQG6D+RLJ1heXtDIs0=; b=gxkTfMOrMD44BOGw657Fe08AVmGk/1IeZxidC3pj7gd5DHBViSbhXOwsm5dPnTf4DB TBYh9k2/UqqKjhnZxqJM5h7vXOP5yZpR4WR7oB9n7gRUmur79JxRClkqSTAq7dXQ+ieA 2NtQSlGdLcknPpHAjGTKUEMJeuhyty19eR2FgvXzetEc1+X2NGUZygvYgFUD4PIApYvl O2E9bMvpmgbOCZ41EkQ7bOAPh2fN6YW7Zn1sxIx07Kw72LPdu9ckb6hCSe8fKHIhVEzl ww9tXQGUPMku3mQpLYbe3+emE6r2puaJJR0aiauyQraKCBsDLL3/iM2asoLoW5mVORoQ 5eCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvJVE2Ds; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si10392636plt.92.2019.08.26.13.44.42; Mon, 26 Aug 2019 13:44:43 -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=@linaro.org header.s=google header.b=fvJVE2Ds; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730418AbfHZUol (ORCPT + 28 others); Mon, 26 Aug 2019 16:44:41 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46128 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbfHZUol (ORCPT ); Mon, 26 Aug 2019 16:44:41 -0400 Received: by mail-wr1-f68.google.com with SMTP id z1so16584957wru.13 for ; Mon, 26 Aug 2019 13:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qsyqwo/7IzN3JSHEHiK8TRXncaQG6D+RLJ1heXtDIs0=; b=fvJVE2DsN4hPUHTHlqLGnsV7U//T7wLenuDI4BZlpfMSSPF2NCpNCccfjhg05pUtkU LQQla8rZQUNfdu4RAUa+pwxR8yx7gINvMIwo41b8ADw2XKkcrLE1iqs3GUu7WinwFvyp ZE4l8/40dTHBGLLhXBfPnKQiqxhLAU6L06RG96VU2nMXsBYAe0oixZpa6XVmVL9yd8pT fx+Unu+WbbMScX5dMW3CLn86cWmU6cpxxkfWaJhn3PdftvmB11+QjCYu61WtNCl5jsvZ 3KRyXDIwtkFFI/0AiBT6nM+AWVZugqplcI8aeRpGgNkUB8jJpmnBr7Ul/PIsQhaB3Xgs BmgQ== 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; bh=Qsyqwo/7IzN3JSHEHiK8TRXncaQG6D+RLJ1heXtDIs0=; b=FwEuEBWFAKYbaRQVHjEwbT4kJNRoF09gqJrBn8o1gCKPWvAl7dx29eBDBJSusvQK2V XDp/K3uXduJVflbnLJb0wBquP/QdeqIvTtQYNd9+Hav0fuM107XNvOsHg3yDTuArY0Us FrO+Tpu5TJNlHJ/rg9wmBbuRYUP0yYI9/U1VTbSXJYvthScqb7nzrL+yUAwVb0B9nlXe sTaR9xAI1sgMCYqQuon53F4e8VPTch0Gd+gVP0uxX4wpatlXY21SXDWjHqKlaHcK/NrC 843bE4Kc2uzixJlmBjtCD6EWM0dE2GoaKroc0iFjFOZelMx/11BbQXNmUK1qBZVMCQl9 mBhQ== X-Gm-Message-State: APjAAAUn9GHhblHqymqAZcWMM1c2l5YamYgtFso/u8z4XYFyeu73WeS/ qJODXEypMQCgZ0v4HDu1OWYmeKOtWCg= X-Received: by 2002:a5d:4cc5:: with SMTP id c5mr23365381wrt.278.1566852279372; Mon, 26 Aug 2019 13:44:39 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f881:f5ed:b15d:96ab]) by smtp.gmail.com with ESMTPSA id 20sm549557wmk.34.2019.08.26.13.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 13:44:38 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Stephen Boyd , Greg Kroah-Hartman Subject: [PATCH 01/20] clocksource: Remove dev_err() usage after platform_get_irq() Date: Mon, 26 Aug 2019 22:43:48 +0200 Message-Id: <20190826204407.17759-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Boyd 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: Greg Kroah-Hartman Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Stephen Boyd Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano --- drivers/clocksource/em_sti.c | 4 +--- drivers/clocksource/sh_cmt.c | 5 +---- drivers/clocksource/sh_tmu.c | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index 8e12b11e81b0..9039df4f90e2 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c @@ -291,10 +291,8 @@ static int em_sti_probe(struct platform_device *pdev) platform_set_drvdata(pdev, p); irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "failed to get irq\n"); + if (irq < 0) return irq; - } /* map memory, let base point to the STI instance */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 55d3e03f2cd4..f6424b61e212 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -776,11 +776,8 @@ static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch, int ret; irq = platform_get_irq(ch->cmt->pdev, ch->index); - if (irq < 0) { - dev_err(&ch->cmt->pdev->dev, "ch%u: failed to get irq\n", - ch->index); + if (irq < 0) return irq; - } ret = request_irq(irq, sh_cmt_interrupt, IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 49f1c805fc95..8c4f3753b36e 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -462,11 +462,8 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index, ch->base = tmu->mapbase + 8 + ch->index * 12; ch->irq = platform_get_irq(tmu->pdev, index); - if (ch->irq < 0) { - dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n", - ch->index); + if (ch->irq < 0) return ch->irq; - } ch->cs_enabled = false; ch->enable_count = 0;