From patchwork Tue May 23 04:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 97727 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1900090vqo; Mon, 22 May 2023 22:06:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MkbyaIgfg5YVF1qOyT/KfATkmicFTL7+bu8WYlIjd6LzoLh1wqMcKqD1rFl2XujM9BVTv X-Received: by 2002:a17:90a:ab08:b0:234:889f:c35d with SMTP id m8-20020a17090aab0800b00234889fc35dmr11684000pjq.3.1684818370650; Mon, 22 May 2023 22:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684818370; cv=none; d=google.com; s=arc-20160816; b=q7lY/mbOzdIRFITIR81iuQUg0QLjFpMBHOnG8YCXVOW3g5E9viLMpQ1pk4evI1ihV0 KMFoP2hcg5kjLPFouRn/9zvR0xo6Zs+8QGyMHGrgeqonOu8xov6kJTO7kGvJlPIlhEsl gMwAP9gNtAgw9Wo5dWvcs5QB4frYuITV3kd/c+tkmf7nsZF9vFfJqWjVPmnZh3onUgsK +E+U8uEVljA5azFU/l4AB9me+Ts+DhuZMpMRl4uiu0UdyhM/W0gB4nDeNaqkn3xT5EWJ D4MqgeDhM9OqS0pkFGs+Q1ftncAuH5J/dkKRq+VOQNIRU4KHXHfVtiMkooOaw6JnpFic WygA== 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=I6wrXTLtk+T+M0+0vot1sHidxwRMTZ+UBL8LgnHHU1Y=; b=TW3c7DfMSLC/NEG2KiaBFwRO/SNW0lSKQsr5WrNgEU6oPpbe5SR36LbmEtCCpNp3KQ rP9eaaemAxCJbyoqq0r8Pop7DrLXRg7mRnidIrpnIfXOd1+rBm93HBOJ2Y/7ZlcJICEo dO9kGvKpkq+i/jGq1brGPZeOZ1nWavSwmPxX5Ruo8lt6DblVvo/6yXPIWJVOKLjXyk3r FuO0eu9UfSi8ox8CUKT7a8Rb17bgthMG9eCemg52gzzKm+1j7qvZGQ6cKhF8+4i0rTLf XC9yIn/llD7PHAYRr9j15qRDETcB7ZAiI3WJ2yIHRsyuLgs6PhZFkvn4PzQ9TslS+wbF y10Q== 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 gf1-20020a17090ac7c100b0025350783742si5812837pjb.5.2023.05.22.22.05.56; Mon, 22 May 2023 22:06:10 -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 S234673AbjEWEqm (ORCPT + 99 others); Tue, 23 May 2023 00:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjEWEq0 (ORCPT ); Tue, 23 May 2023 00:46:26 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A087910C; Mon, 22 May 2023 21:46:24 -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 656A3139F; Mon, 22 May 2023 21:47:09 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.42.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 38CE93F6C4; Mon, 22 May 2023 21:46:16 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Ganapatrao Kulkarni , Steve Clevenger , 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, James Clark Subject: [PATCH V4 2/6] coresight: etm4x: Drop iomem 'base' argument from etm4_probe() Date: Tue, 23 May 2023 10:15:49 +0530 Message-Id: <20230523044553.1525048-3-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523044553.1525048-1-anshuman.khandual@arm.com> References: <20230523044553.1525048-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,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766660108183860804?= X-GMAIL-MSGID: =?utf-8?q?1766660108183860804?= '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 7e96293c638f..748d2ef53cb0 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;