Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2372106rwl; Sun, 26 Mar 2023 22:06:50 -0700 (PDT) X-Google-Smtp-Source: AKy350a2fkSvD2PgF7nmvk1HvGTmmHgdTnVbGBKkUIPh4AxUJ7ruhBj4SpavLNZPlWLmatxtr68N X-Received: by 2002:a17:90b:4c0d:b0:23d:360:877a with SMTP id na13-20020a17090b4c0d00b0023d0360877amr10723830pjb.25.1679893610452; Sun, 26 Mar 2023 22:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679893610; cv=none; d=google.com; s=arc-20160816; b=tRzM7ZNh4LkIpaojNKdr/8k1l9N3an+jzu6U8ez2fgtuf3g7XwV9Nr2Z40fBdQDsR1 MxnM2RSWaHpK1D2FEQ41+S/0aHYZ+/lu+FZWAJ3BoNhRBxn/TFMmuj1g4OTW5lnlfcDU ki9YdGpDhH97L5F6XWD0g1IVM6bY6X9QM6KbfJt0xshXCXSPnNDbdMbvqQ68QkBcgmq+ WRa7tgRD5NNZQQQ+ZWbGJ9RF6hBPU7R/4bHf530oWIt2RcqemS4mP+y7HHBH2Ql9b2Mi UEgiXPQv1Fdui47Av5f7HDbKUJmnFhsxf+Kbu7xODDwBscSEjFGeTyAXmnBYqbgVT9c4 Y0jA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a17090a9f0200b0023f9cb51eaesi5506878pjp.84.2023.03.26.22.06.39; Sun, 26 Mar 2023 22:06:50 -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 S231979AbjC0FGW (ORCPT + 99 others); Mon, 27 Mar 2023 01:06:22 -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 Content-Transfer-Encoding: 8bit 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 '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; -- 2.25.1