Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5100960ybi; Tue, 30 Jul 2019 13:49:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgcdL8xclTdphYh09p6PoXFnSdkDrT1UXLtpSHrds7UDd2A5cjNGFDYgVg+7QH44Fmkk+9 X-Received: by 2002:a17:90a:1c17:: with SMTP id s23mr119430448pjs.108.1564519752317; Tue, 30 Jul 2019 13:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564519752; cv=none; d=google.com; s=arc-20160816; b=ueSv25k7WOZkH937GF1Jmz05Gjgl3jbYwbLxyZikFKD/9ID2uFcJi/BRnT5atqq9Sy UQ2FK2Iu8I3vvWp8Y1okZhr20estzXFW1nc9GMFiOOutdV29BT0SZlArngXRwiYVEI2D kC6TDiy5ivCFH2FKuCPxsQXSpVFToE+Si6UQtutqsVnIKPjxvXDjVMXF1OU2oiAm00Mg CbfchxYl5cbUxmTyCTPJpWoJY3OKQ/dnoFaYu0rMsbT/kMTPrleoGArPMvWDJtOPQlsc 0iZR2CISE8dcLQw7P2dNpImDZJQcFXtnnWIuDy3PhI/AyM0AyOLkjyMDJXcPCU4OFb7W ysWw== 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=AZvanaYGQHCeCe8d2+RSzqNKocPRl2CR5zzefJtoMkI=; b=AGH5hBLgKc6E1JGD+/ikS4BB0B8W7siSdYuzAvsjwlQ2CnUfE4UOr3487VV4krqaEi fFIQA5zhgkBhcYd1W7r/4Dx/eM2yTHNeC3ZXJrHZL3NI6XRE9tUzYRhvLLuGnZeJBvdE gj3U6TnzkWzaoQYQrsYk7vWR+eOT6fQDSt3AMiOi77j2CjuCfpHU5OB3sv2mRSU5/ga9 61ENQZUgtAm3rKI1aP2JhExVBwWgDRoXrpzesijASvSq7/3dRTqpkkpvohmJ1to2LplY M6f3zUMxyHCLgD0cZQ8Mu5r1mtrchBSDTFt54fFQeS9nyXCy/bUGDZy37ULb4O2XmAx5 y0ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HF5OnRSm; 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 m3si24634155pgj.367.2019.07.30.13.48.56; Tue, 30 Jul 2019 13:49:12 -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=HF5OnRSm; 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 S2388087AbfG3SQh (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:37 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35300 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387944AbfG3SQ0 (ORCPT ); Tue, 30 Jul 2019 14:16:26 -0400 Received: by mail-pl1-f194.google.com with SMTP id w24so29209334plp.2 for ; Tue, 30 Jul 2019 11:16:26 -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=aICk7eFBWe9Ra8vc7GhIch7TOwUayo2UIWnDuNb3ZJy9GnUWTC9Ln5NXd5FrbbLQWz d2+so767UxThmj+z1ugePu7tOchPX6vs/vlb5TYGe3Jm6zD0lKeE2b4TWpbVMmflgQbG fTOlBmPBzL6slmApEG5b+C+iD6lVtzvDiXRy7ux/EmzVOtFfS/pfdeVsTfRh9PYIhpKA kyFnKbBSEzUaJwELwDsGYRnBRy198mh3SshGrmZacY2asMvqMBjY+7B/IuUvMrQaz8sZ 3780LRUahfjnuaBg1qOhHlQoV+a+2LYqA/yAnXVZaaPOcvh3GDcqKujBaSzqa3y0IBfN vuPQ== X-Gm-Message-State: APjAAAVRSGdutLbACrv85EjP4plj/x4xGXWZXg6bKG3PUk0mMIUvPxJD XIxSP4H0H5QrfwFMkgrlsuoDrMdFumv9ZQ== 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 Cc: Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman 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 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: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- 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, -- Sent by a computer through tubes