From patchwork Mon Mar 27 05:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 75210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1281318vqo; Sun, 26 Mar 2023 22:16:29 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNSv1fQVkMVferSr+mPZsXmcFeAvZojWFM8FDz5UBigKyY4jIRdkYyY1VeIu8E2dKMXhNa X-Received: by 2002:a17:902:f34d:b0:1a1:cef2:accf with SMTP id q13-20020a170902f34d00b001a1cef2accfmr8240404ple.30.1679894189343; Sun, 26 Mar 2023 22:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679894189; cv=none; d=google.com; s=arc-20160816; b=oSV29+LklVeNvgCtzzv2hribKbgqU9QqIs0Nl5GJejf0p06JET7RjIvbkbqL/U861b 6e2hfemSTWZkaYMaYAUoxn550euoUisYBYB/kl3gzBne65e5a+C6wUv9p6ryFhjkvOUW RFzQS1RlIg8pG8yHiF8fM2VSxmJ+brvAYLKrpot/d02bwuESNa9Dqm3aUAG/zABpilCA oLaIeees9Y+mFsEwVc3HCbZwmjyZu0KX02FL17miTb9zRL91Dd4RM1TGHthmpP9GHG1e PstCpwyJY7ZBp+cDihA7IB+cvx7Z5Kry6mXK5AYWw4CmXa/bE/2ZuCRBkiUzvmTnFKVP oT0w== 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=KLFo8+keYQHSS5ZvX4FicQF201JQqJMbW2wZeE+hQ5x/z0iExLrN07Rz0j0AB2sNeI 52Ud+i21mYvfRBp2nY2VHDEts6OdpsUXoxARky98icivIU+8WzaaXp4+Sr52M0cUEqkN 0USMdsHC11w7hljH+ouzYKb+eqsTCYr7bktllKfQUOdoRFJEH0v7jUh8RO51b8tPKH1A gQJOzcaxVv2USv1xeOAljPnoRrWuobGtNvPdHVom0kTnSXwd1Au5kfX/Bl22E7+OgBE2 6stqVkqhIJgalgrAU/VNzS4fdjknId51Qta4aSzZR/w+mpXhwY235RshDFNfhoAdCJli y6hQ== 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 p9-20020a170902e74900b001a216fddd06si7266649plf.652.2023.03.26.22.16.15; Sun, 26 Mar 2023 22:16:29 -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 S231986AbjC0FGX (ORCPT + 99 others); Mon, 27 Mar 2023 01:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231659AbjC0FGK (ORCPT ); Mon, 27 Mar 2023 01:06:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C380646AE; Sun, 26 Mar 2023 22:06:06 -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 937C2FEC; Sun, 26 Mar 2023 22:06:50 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.42.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 63F7F3F73F; Sun, 26 Mar 2023 22:06:00 -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 V2 2/5] coresight: etm4x: Drop iomem 'base' argument from etm4_probe() Date: Mon, 27 Mar 2023 10:35:34 +0530 Message-Id: <20230327050537.30861-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230327050537.30861-1-anshuman.khandual@arm.com> References: <20230327050537.30861-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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?1761496729574776542?= X-GMAIL-MSGID: =?utf-8?q?1761496729574776542?= '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 Reviewed-by: James Clark --- 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;