From patchwork Fri Mar 17 03:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 71048 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp116592wrt; Thu, 16 Mar 2023 20:07:34 -0700 (PDT) X-Google-Smtp-Source: AK7set8qeFTrCWw3I2EUs3m9cKbGnNd2dIi+Zby9+zO0+Nysk6ffbvvKEuf53ZqSKLuQ/xkpafnD X-Received: by 2002:a17:90b:388d:b0:234:b082:48a2 with SMTP id mu13-20020a17090b388d00b00234b08248a2mr6372598pjb.28.1679022454233; Thu, 16 Mar 2023 20:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679022454; cv=none; d=google.com; s=arc-20160816; b=nwqh/yYiR2tHmtJ16neroDv1PCfND4bN+AE2OqbBe8f8PnN0vab0IoCbJ8eWvtz1Mg VDLsgNHGIWzmkkZL714dZsLbkENLmqhGyXTwxVTeDHk8RqxOQdvrkEbCi4iUGLZ/I9fe 9S4bEvzkJlc8r/WUsxVmjZsW9MNiOoKgh58eyfoAXoXuIjUbRroJKkxNekVSrO9WWJmr rEZwCFk3pAnXts0eA1S2XkPWEdtkCtoA6kZr+TB8rvXCA5rQVPziFoyZjkbprquapI1s oB9GNDpKQnBq57q2WKO+hwnmoCQbjStvCxyUhOVtBQJmgQK6eeagq5ox3u8hSyeBp9eB YK9A== 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=6Gi4/49EQaY5F173VRmAAdjV2avRwD4xBU+tmojtZgA=; b=MkpLvAP7FHEpALhN/S1QZbM03z0nHMsfARitvVSzMa0MKnT3RO50ihfTwtVdyOwyDR wk21qWHu70M9UX5b2PLDUrDi/QamiKOy9m9Zhz9KO4GnzK5WMDYu/mueZfQNty5qmQ1g CkzFedvknMImiacrX4M38HAtHJWwmDw5tAI8wiX36XPuWayASEZziryE05oOS9HCSMkS bgYFpwwVNdzU9y4jV5iotnnFOfBrMg2yrdNk3cv/bXCk7Udv6zX5QwP1cGSZ5f/RzP8/ UZcmAWyizve46aFr4zP4bWozGainrmyfI8XSgUChB6MqOa1k8DRpPiuZhaqVT/gVKNJp eO1Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pm9-20020a17090b3c4900b002344ef1a33esi862682pjb.98.2023.03.16.20.07.18; Thu, 16 Mar 2023 20:07:34 -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 S229770AbjCQDFw (ORCPT + 99 others); Thu, 16 Mar 2023 23:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjCQDFn (ORCPT ); Thu, 16 Mar 2023 23:05:43 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C3B846E68D; Thu, 16 Mar 2023 20:05:34 -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 4BD804B3; Thu, 16 Mar 2023 20:06:18 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.40.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2E47C3F64C; Thu, 16 Mar 2023 20:05:27 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, suzuki.poulose@arm.com Cc: scclevenger@os.amperecomputing.com, Anshuman Khandual , Rob Herring , Frank Rowand , Russell King , Greg Kroah-Hartman , "Rafael J. Wysocki" , 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 Subject: [PATCH 2/7] coresight: etm4x: Drop iomem 'base' argument from etm4_probe() Date: Fri, 17 Mar 2023 08:34:56 +0530 Message-Id: <20230317030501.1811905-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230317030501.1811905-1-anshuman.khandual@arm.com> References: <20230317030501.1811905-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760582648505983638?= X-GMAIL-MSGID: =?utf-8?q?1760582648505983638?= '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 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 10119c223fbe..5d77571a8df9 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2048,7 +2048,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 }; @@ -2069,8 +2069,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); @@ -2124,8 +2122,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); @@ -2141,6 +2140,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); @@ -2151,7 +2151,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;