From patchwork Tue Jul 30 18:15:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 11066427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8A0813A0 for ; Tue, 30 Jul 2019 18:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB05728488 for ; Tue, 30 Jul 2019 18:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA777287A0; Tue, 30 Jul 2019 18:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 280EF28488 for ; Tue, 30 Jul 2019 18:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F1dotHd88a7HcqrNxdHDU5ZHh54PUMkHdWaO27YBgW4=; b=jUPmi2BthI8ZKd MBEYK2XKAlO6XRD75QT4Rw6dVHAxFN/3HyBT2GMqp3YLvfYVLCHyo6MYYdXKYO3EWf4FmKQZ+HWcp Jvl83uemAb2VotwpxIklAriS/d2S1kiY1xbqV7kET9s8o65nBkWm+CGfwJWJUUa8/8Oukhse6xjBQ xBg8ODfiYMo+pyfylHwWE/szbrPA3xewlxjY9KfX1Nxp3AnoGmm7D65ltbsXvpyWJOvSuAdzyUZ+g 6oVZ0W7t8EieWkNqybWarlTxr4A7vxO2uAcokAObpDqAp573dif1nLDmWCADIFpX7FwkNF1xgs+nL tDmYXHgB5vfzEN5BARuQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsWfS-0001Yx-OW; Tue, 30 Jul 2019 18:16:10 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsWfO-0001Xy-5c for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2019 18:16:08 +0000 Received: by mail-pg1-x541.google.com with SMTP id n9so24256004pgc.1 for ; Tue, 30 Jul 2019 11:16:05 -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=50VWY4DOvJCsLbogXvcfIy87Phisvb7R/qkulHRQtQE=; b=b3mg+KDmpIO81yQrcZUSpzOusHXsPRu2YTZBtorn1AEo3N6GiptcooL6U8tMTo+gTG lIYB8l6l6OrtiBRTPCwwVeU7F0QlclDCDwnUbiuFLyyK+81JVEa7Lq5TKHvVQ610YkBF neATcqsL6f5giH+IoqxpKjFEtws9P29MaAOJY= 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=50VWY4DOvJCsLbogXvcfIy87Phisvb7R/qkulHRQtQE=; b=LNQOY5MnEwfI9N0n5coAc4xBhgnuxxuOrdBDkKbWhmpp+3D70rwaPMknagR1AAJEI4 bhq4Y8eskB8IilE/236b0cObLxzI2IS0tpChxcE7JASFs4Qah3KwdtOBNUBRQZsxnZyE cE8e8bNzIeM6LLOoURQoJQCwzk6ymhWJsowAGEVZE82ij+TqoP4GUBV9DmS6ZdIiQdEM g1kzkkNsrNa92uocx04bngAAO1kajyWuvRV7ifilLJ0+Fel/EdlTl89Do68KXLOH7rt0 pRD66GMeAzVGo2mFv+AdQHHzGMoC97vtSBhjDVXjr6bj+cO7DjAK+q108AqLFsxs1ZTE a00A== X-Gm-Message-State: APjAAAVLlG8phT3eSDSwpTP6n9VkkafKv1XjOo2cGwyS2g5T2ZPoww97 SmwRINEQ1Ws5xT7dwIaT48l9XA== X-Google-Smtp-Source: APXvYqwur07swqKyif5Dp1u0EIDJAkQU8t63hD8i7gGz9LNFXf5yqejN6CfyDWSarneFR2nt+qIVAA== X-Received: by 2002:a65:64c6:: with SMTP id t6mr112287304pgv.323.1564510565436; Tue, 30 Jul 2019 11:16:05 -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.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:05 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Subject: [PATCH v6 07/57] ARM: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:07 -0700 Message-Id: <20190730181557.90391-8-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190730_111606_204449_9E817EB3 X-CRM114-Status: GOOD ( 15.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Lindgren , Greg Kroah-Hartman , Russell King , Maxime Ripard , Chen-Yu Tsai , Simon Horman , Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Russell King Cc: Shawn Guo Cc: Tony Lindgren Cc: Maxime Ripard Cc: Simon Horman Cc: Chen-Yu Tsai Cc: linux-arm-kernel@lists.infradead.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees arch/arm/plat-omap/dma.c | 1 - arch/arm/plat-pxa/ssp.c | 5 ++--- arch/arm/plat-samsung/adc.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 79f43acf9acb..9386b2e9b332 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1371,7 +1371,6 @@ static int omap_system_dma_probe(struct platform_device *pdev) strcpy(irq_name, "0"); dma_irq = platform_get_irq_byname(pdev, irq_name); if (dma_irq < 0) { - dev_err(&pdev->dev, "failed: request IRQ %d", dma_irq); ret = dma_irq; goto exit_dma_lch_fail; } diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 9a6e4923bd69..88b5dd99f6bc 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -146,10 +146,9 @@ static int pxa_ssp_probe(struct platform_device *pdev) } ssp->irq = platform_get_irq(pdev, 0); - if (ssp->irq < 0) { - dev_err(dev, "no IRQ resource defined\n"); + if (ssp->irq < 0) return -ENODEV; - } + if (dev->of_node) { const struct of_device_id *id = diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index ee3d5c989a76..4bbeca3cbd9e 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -354,10 +354,8 @@ static int s3c_adc_probe(struct platform_device *pdev) } adc->irq = platform_get_irq(pdev, 1); - if (adc->irq <= 0) { - dev_err(dev, "failed to get adc irq\n"); + if (adc->irq <= 0) return -ENOENT; - } ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); From patchwork Tue Jul 30 18:15:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 11066431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3D3213B1 for ; Tue, 30 Jul 2019 18:16:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6545284B9 for ; Tue, 30 Jul 2019 18:16:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7736287A0; Tue, 30 Jul 2019 18:16:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 28089284B9 for ; Tue, 30 Jul 2019 18:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q8a0LzUpKg4/t3SRMk7ETIapOY0NH+ob93Ab8vv7wJ0=; b=qwrm46gHJ4nNYn 7o0pdOl8C/WjzaO79YrIVK2V+4MLopWTgMPn7taZZPbsTcdh8T/1W2mw47jMt7iGPikbde0KiB1JU tjOD+v67MS0ZF3cvfK33Qdz3XuZckedXvqHT2xl/v+E9csBJ9RLcqriwDsb0ZLIDNl5qVVsnlv5UO dG7da7Gd7lWfTYlUjXgsf/vRRxgljHgHlCk/94MBKvzwVx+Zqd54wkyLw9UwnxjZP1Kv/vPj5ec9g fktY54/Mlk3dY0Lb68ZeQbsDequVDCdV/AYHZq93yZ1eeYvx2JguEjISWrOgWql53lf/qWEsCwU5l L+Ur1npQ9ZlPZ5y7jrEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsWfn-0001q8-NG; Tue, 30 Jul 2019 18:16:31 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsWfi-0001n5-3u for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2019 18:16:29 +0000 Received: by mail-pl1-x643.google.com with SMTP id k8so29230036plt.3 for ; Tue, 30 Jul 2019 11:16:25 -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=AZvanaYGQHCeCe8d2+RSzqNKocPRl2CR5zzefJtoMkI=; b=HF5OnRSmMh2mz0tcIzJD/fB71owMPCZLGeTM1w0J44yIRKz6ezQnukLhlUbQs54QH0 VcTZU85lRduHS+pPoNoiI/1gOtnVnUcym28dtLh/iqXnU3l60s9c85wMcauQgZQgPQLQ hjYmYUEvujlBiprv/pluRVkJKsrv1XJGt7f0Y= 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=AZvanaYGQHCeCe8d2+RSzqNKocPRl2CR5zzefJtoMkI=; b=dVKWINNJlcjP94zTtkx/+DMoeqbgEjyUQu5LCoxvXhxFg0mtEmoSNEg+TQA+na0ay0 DXZyUnpw8GEEZsqot78OFUR4p2QvepF+ld+ARFVG5XmqX55fK0d4YlGwOxn4fOEeSnL9 mn+TKdUFdYutdIJRBSx6nb8miU/OLAm8fHbcyxekI3j2XmIoiiIJo05iRqiFYPpWZWhX jJHg9vHqPenO6hw6Y9o82Nc498bOOLRfFQefj6NnsO4rw0ywoBcQiHEzZ3h0+AxUvYMl WRQlJdShfVRrtJ1rs0/Kl0R3EwCrbakJ+bl7Qs54QEhQSqw8iG30kme2EOw7DWl+pkQX yH7Q== X-Gm-Message-State: APjAAAXS/e1Pd+nT24/XWvcnr9ZAwvIdW5ajTnVopjuGDqMByzZYxi4t kje2y572yyByn0xi7g4RVe07fw== X-Google-Smtp-Source: APXvYqzp3gdb8JqpjQ0n3ss05I71VUq27CGUDkIsctzC6HmCCofvpLMH1Tg0Gl+4gJbHgu+hPLZPew== X-Received: by 2002:a17:902:ac87:: with SMTP id h7mr120307087plr.36.1564510585537; Tue, 30 Jul 2019 11:16:25 -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.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:24 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Subject: [PATCH v6 32/57] perf: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:32 -0700 Message-Id: <20190730181557.90391-33-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190730_111626_169485_3FC40AF0 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Greg Kroah-Hartman , Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Acked-by: Will Deacon --- Please apply directly to subsystem trees drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 +--- drivers/perf/qcom_l2_pmu.c | 6 +----- drivers/perf/xgene_pmu.c | 4 +--- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c index 6ad0823bcf23..e42d4464c2cf 100644 --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c @@ -217,10 +217,8 @@ static int hisi_ddrc_pmu_init_irq(struct hisi_pmu *ddrc_pmu, /* Read and init IRQ */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "DDRC PMU get irq fail; irq:%d\n", irq); + if (irq < 0) return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_ddrc_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD, diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c index 4f2917f3e25e..f28063873e11 100644 --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c @@ -207,10 +207,8 @@ static int hisi_hha_pmu_init_irq(struct hisi_pmu *hha_pmu, /* Read and init IRQ */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "HHA PMU get irq fail; irq:%d\n", irq); + if (irq < 0) return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_hha_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD, diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c index 9153e093f9df..078b8dc57250 100644 --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c @@ -206,10 +206,8 @@ static int hisi_l3c_pmu_init_irq(struct hisi_pmu *l3c_pmu, /* Read and init IRQ */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "L3C PMU get irq fail; irq:%d\n", irq); + if (irq < 0) return irq; - } ret = devm_request_irq(&pdev->dev, irq, hisi_l3c_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD, diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index d06182fe14b8..21d6991dbe0b 100644 --- a/drivers/perf/qcom_l2_pmu.c +++ b/drivers/perf/qcom_l2_pmu.c @@ -909,12 +909,8 @@ static int l2_cache_pmu_probe_cluster(struct device *dev, void *data) cluster->cluster_id = fw_cluster_id; irq = platform_get_irq(sdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, - "Failed to get valid irq for cluster %ld\n", - fw_cluster_id); + if (irq < 0) return irq; - } irq_set_status_flags(irq, IRQ_NOAUTOEN); cluster->irq = irq; diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c index 3259e2ebeb39..7e328d6385c3 100644 --- a/drivers/perf/xgene_pmu.c +++ b/drivers/perf/xgene_pmu.c @@ -1901,10 +1901,8 @@ static int xgene_pmu_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "No IRQ resource\n"); + if (irq < 0) return -EINVAL; - } rc = devm_request_irq(&pdev->dev, irq, xgene_pmu_isr, IRQF_NOBALANCING | IRQF_NO_THREAD,