Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34935499rwd; Sun, 9 Jul 2023 23:35:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOsJgk2PYCFHCGvHu3+YHVYn6dcyFg5FmcuHuO2n1c2vSWpIEbmaSEPhWD6uiv9B8pH5aI X-Received: by 2002:a17:906:29c:b0:977:d660:c5aa with SMTP id 28-20020a170906029c00b00977d660c5aamr17302537ejf.31.1688970943438; Sun, 09 Jul 2023 23:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688970943; cv=none; d=google.com; s=arc-20160816; b=VDAELkik6BwT8OhITluhLs6TZajYfbbFv1TkJUqyQXgt6mPKvqzxKFILwVlyabihmd ClMj2FUYKjT2JiXprl/hNVpA0snooytHvfkcSuSbfwyAfsJXGKmJoSqu9OyiIWC7oGZw 8HjJjYfd01yHMr8J/bVZDsYl67TkzCnm+ITM1oRxRqHD4Xma6rdmexN5a75rTl0Nt1uO Q40Wcf3nZzpiKO54nU9W0l6jllWfNMlA/F0cA+aIdq6xJwYXN6FFbJC0Dqs1KriG1itJ WvKt2EEpAU+bklW96jI1+w14hQ6kLux94kYwj7906nNLA/dUIkN/pNbrr3524dV9DN4J ebCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0j4dI3FimJiTTkmqd9o33hvCYlrF7wD1Z4uVboOCSok=; fh=hdwAEthwmb3POkfgUnaElOYfdpDheN8UmlA27oZrR2A=; b=fHkKr7rzmQHCPxL1T3dMu3pG40WtKGJrYzQuK5lsm/cA7tf4xLBh4dYjjavKPeLBQ5 gJC7ctmq5KNRvp2HkXRhEazv8Uo1LJmZxrACjGwrcsXVv2vcTx8C2EIT1QEmWYtb0hYl bZeZE9oGgq2oBzLrJE4RpFKF08bKkzmloEo2B3MKr7/7B7pSRhAxx1BFpmflqpzA5gYW akChfyMPgHqUymcB76bjn4LOfyNCJE9nQw0zL2AaDhg7u0yaTesoxaYPTt+Q4H4N3nuP eT/oo85UEaHDIRwWZM49lImBYO+TXdkjt+8HHvlcqvqhw5eYFJrerK7+dikBL1LpXZs9 avAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ov19-20020a170906fc1300b00992c5cf17f9si8046679ejb.43.2023.07.09.23.35.19; Sun, 09 Jul 2023 23:35:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231206AbjGJGZq (ORCPT + 99 others); Mon, 10 Jul 2023 02:25:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbjGJGZc (ORCPT ); Mon, 10 Jul 2023 02:25:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07C0418B; Sun, 9 Jul 2023 23:25:30 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CDE101FB; Sun, 9 Jul 2023 23:26:11 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.40.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1B6273F67D; Sun, 9 Jul 2023 23:25:22 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, suzuki.poulose@arm.com, gregkh@linuxfoundation.org, rafael@kernel.org Cc: Anshuman Khandual , Ganapatrao Kulkarni , Steve Clevenger , Rob Herring , Frank Rowand , Russell King , Len Brown , Sudeep Holla , Lorenzo Pieralisi , Mathieu Poirier , Mike Leach , Leo Yan , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark Subject: [PATCH V6 2/6] coresight: etm4x: Drop iomem 'base' argument from etm4_probe() Date: Mon, 10 Jul 2023 11:54:56 +0530 Message-Id: <20230710062500.45147-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230710062500.45147-1-anshuman.khandual@arm.com> References: <20230710062500.45147-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'struct etm4_drvdata' itself can carry the base address before etm4_probe() gets called. Just drop that redundant argument from etm4_probe(). Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: James Clark Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 264242ba345b..bf93147c23ca 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2044,7 +2044,7 @@ static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg) return 0; } -static int etm4_probe(struct device *dev, void __iomem *base, u32 etm_pid) +static int etm4_probe(struct device *dev, u32 etm_pid) { struct etmv4_drvdata *drvdata = dev_get_drvdata(dev); struct csdev_access access = { 0 }; @@ -2065,8 +2065,6 @@ static int etm4_probe(struct device *dev, void __iomem *base, u32 etm_pid) return -ENOMEM; } - drvdata->base = base; - spin_lock_init(&drvdata->spinlock); drvdata->cpu = coresight_get_cpu(dev); @@ -2120,8 +2118,9 @@ static int etm4_probe_amba(struct amba_device *adev, const struct amba_id *id) if (!drvdata) return -ENOMEM; + drvdata->base = base; dev_set_drvdata(dev, drvdata); - ret = etm4_probe(dev, base, id->id); + ret = etm4_probe(dev, id->id); if (!ret) pm_runtime_put(&adev->dev); @@ -2137,6 +2136,7 @@ static int etm4_probe_platform_dev(struct platform_device *pdev) if (!drvdata) return -ENOMEM; + drvdata->base = NULL; dev_set_drvdata(&pdev->dev, drvdata); pm_runtime_get_noresume(&pdev->dev); pm_runtime_set_active(&pdev->dev); @@ -2147,7 +2147,7 @@ static int etm4_probe_platform_dev(struct platform_device *pdev) * HW by reading appropriate registers on the HW * and thus we could skip the PID. */ - ret = etm4_probe(&pdev->dev, NULL, 0); + ret = etm4_probe(&pdev->dev, 0); pm_runtime_put(&pdev->dev); return ret; -- 2.25.1