Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp291040rdb; Thu, 19 Oct 2023 04:55:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSohM812Pa+6orc2esnkvZx6CoGmicuPvts4/NVW9AkkM+2l4z4g+ejzYagsgtqmRAs3YZ X-Received: by 2002:a05:6a00:2d0f:b0:6ba:8478:b99f with SMTP id fa15-20020a056a002d0f00b006ba8478b99fmr1766118pfb.28.1697716546141; Thu, 19 Oct 2023 04:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697716546; cv=none; d=google.com; s=arc-20160816; b=iihygGlKhEV7lCYg4Iy7ocdp1gDoyIIU/Mq4mPPBP5iD6HdbRN/KcG/P/FkcPQ35Oi iiPPhuG2pVCJ5WHPxVkFicKU24rCgv58MajSUMRm+eTyrIgig3aFbcGz0nndG1Zn/SLw h8ZrVSe1gKJTauVm8Qja9GREUjx8HdSt6kkRthzk+xvyhtB49+5msmN7buCoUvS4lYUc IibjSmElIVNnnpX1UCgPIpnkHyfiD666wQpamh6/mm9Ye0YB815fXNC41lZARjAoeQeN xaC3Lw7BCAIx0RPkuMPgvOoo7wvkiZV6HgqDl3M1lJ7lYQy/8hXtgAjelA1fXW4DzF93 t/cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:thread-index :content-language:content-transfer-encoding:mime-version:message-id :date:subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=psy4QftyA5KPXqqnQvROb7WNKzsQxIims/4fEJN+UQI=; fh=za2Ddqh0pPdNj4p+pypF3ipiFhfLO31rK06zIw+vlFU=; b=BIDRbn+RWF2SBO+EuJr4jw+YdJ1AQvQuYXgsNj6pO4J6Wvu+GbDtKur6ffVwlMR9bR g31MYI/5osaN/qZsXn6KzhXO+N4StWf/w4/9OGis4cX2Dq5ylA8CWhE+K8L6pfgeCZgu U9KWG4LSdk1ZY/5bCn7BFJaCX5eibOx3o3VOs7GE8A6bKiiOGqPTQSthHR7DfutTek8y PvVNwkvI5EnkKuRxMoAmRo7TluBAfDRAhEMcJ2KtAkZcWsVLQay0gAc6Nlx0ibAx2SJV 60Va1g8XveTx/7jlcDGYsJ8TZvzJ7h5+9yYsV9VpO/RDh7u8XCvDPrh8rtI2SOYPl6EU t6nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=fMbYulMt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l2-20020a056a00140200b006b6fd9e583esi6159773pfu.1.2023.10.19.04.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:55:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=fMbYulMt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F3E17822CE22; Thu, 19 Oct 2023 04:55:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235256AbjJSLzl (ORCPT + 99 others); Thu, 19 Oct 2023 07:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235323AbjJSLzh (ORCPT ); Thu, 19 Oct 2023 07:55:37 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DF4138 for ; Thu, 19 Oct 2023 04:55:34 -0700 (PDT) Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20231019115533epoutp03ba1bba470c41420a545bbdc43052a92c~PgDEj33lA1738017380epoutp03H for ; Thu, 19 Oct 2023 11:55:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20231019115533epoutp03ba1bba470c41420a545bbdc43052a92c~PgDEj33lA1738017380epoutp03H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1697716533; bh=psy4QftyA5KPXqqnQvROb7WNKzsQxIims/4fEJN+UQI=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=fMbYulMteJW3LrPneG9t+AwXPKgUnUGgWis9FQUGxvXJmPfBQD4QK6Zaug1PaJUjN qT01POA1dei+WGjPhNsxhlF6WDIALTrIEfu006CJpzLeq+ljuMUzYo6H2ikuJaYFfD x2ePTk+3c6GNTl8iPKWVVeOe2V5olgFGkaXfNU3s= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20231019115531epcas1p2eda8408e7529aa70e32cb86451d97f6f~PgDC7L1xM0430504305epcas1p2D; Thu, 19 Oct 2023 11:55:31 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.38.237]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4SB5kp2WnSz4x9Py; Thu, 19 Oct 2023 11:55:30 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id B1.B1.09744.23911356; Thu, 19 Oct 2023 20:55:30 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231019115529epcas1p2bf7d77ba6a893ea2f37974f98b824232~PgDBQejpf0430504305epcas1p2C; Thu, 19 Oct 2023 11:55:29 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231019115529epsmtrp1359b6b9a93630d8d36f59ad7ce699b6f~PgDBOxaD82014720147epsmtrp1y; Thu, 19 Oct 2023 11:55:29 +0000 (GMT) X-AuditID: b6c32a35-107fa70000002610-26-6531193266b9 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 01.0A.08817.13911356; Thu, 19 Oct 2023 20:55:29 +0900 (KST) Received: from cw00choi03 (unknown [10.113.111.106]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231019115529epsmtip2cb86bfd56724e16c8aefef5f0179a41b~PgDA5E3g90465904659epsmtip2I; Thu, 19 Oct 2023 11:55:29 +0000 (GMT) From: "Chanwoo Choi" To: "'Sascha Hauer'" , Cc: , , , "'Heiko Stuebner'" , "'Chanwoo Choi'" , "'Kyungmin Park'" , "'MyungJoo Ham'" , "'Will Deacon'" , "'Mark Rutland'" , , "'Michael Riesch'" , "'Robin Murphy'" , "'Vincent Legoll'" , "'Rob Herring'" , "'Krzysztof Kozlowski'" , "'Conor Dooley'" , , "'Sebastian Reichel'" In-Reply-To: <20231018061714.3553817-14-s.hauer@pengutronix.de> Subject: RE: [PATCH v8 13/26] PM / devfreq: rockchip-dfi: Pass private data struct to internal functions Date: Thu, 19 Oct 2023 20:55:29 +0900 Message-ID: <001801da0283$27db0f50$77912df0$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language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gapQrwpiZVVqUX58UWlOanFhxilOViUxHm/ve5NERJITyxJzU5NLUgtgsky cXBKNTBF3Cjmby1Ni83qU2E6MEdXtfk2x2qjzW0/Z6zckiJv++6N4UOZCwVz7x61/uZx/GP9 zOdcf9aYWu5R59PmNJhRZ7ih4/uhvaVMyo3JlvwuC9/G/g3I3RPzTldfVsh2U+kcX+ZgNYWT Uml7vra8+u8pPGedBh/D7CrP7akCX/i/Kc5Ost13VVzmCrPF84DaY/cMX4ewLhH4u8TUlJH1 ldqm/TcKBf9/rv98d6qYZTVPuKqGrtbihcF8SUKH+kO7yk+XP151Zo1Cg0945RuXuQ1z1ocs VZxQKL/Ca7Ni8brjbAcfnjBslywL/lMqHVP9f8+XlL6XfEqCgiva4wqDBZa9dPz3t8r25beX YclnLZRYijMSDbWYi4oTAYFzOaZtAwAA X-CMS-MailID: 20231019115529epcas1p2bf7d77ba6a893ea2f37974f98b824232 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231018063753epcas1p45e46817a10b532029db3cc843ce7f6af References: <20231018061714.3553817-1-s.hauer@pengutronix.de> <20231018061714.3553817-14-s.hauer@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:55:45 -0700 (PDT) > -----Original Message----- > From: Sascha Hauer > Sent: Wednesday, October 18, 2023 3:17 PM > To: linux-rockchip@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > linux-pm@vger.kernel.org; Heiko Stuebner ; Chanwoo Choi > ; Kyungmin Park ; MyungJoo > Ham ; Will Deacon ; Mark > Rutland ; kernel@pengutronix.de; Michael Riesch > ; Robin Murphy ; > Vincent Legoll ; Rob Herring > ; Krzysztof Kozlowski > ; Conor Dooley ; > devicetree@vger.kernel.org; Sebastian Reichel > ; Sascha Hauer ; > Jonathan Cameron ; Chanwoo Choi > > Subject: [PATCH v8 13/26] PM / devfreq: rockchip-dfi: Pass private data > struct to internal functions > > The internal functions do not need the struct devfreq_event_dev *, so pass > them the struct rockchip_dfi *. This is a preparation for adding perf > support later which doesn't have a struct devfreq_event_dev *. > > Reviewed-by: Jonathan Cameron > Reviewed-by: Sebastian Reichel > Acked-by: Chanwoo Choi > Signed-off-by: Sascha Hauer > --- > drivers/devfreq/event/rockchip-dfi.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/devfreq/event/rockchip-dfi.c > b/drivers/devfreq/event/rockchip-dfi.c > index bdf421b248df9..d56a33d03db4c 100644 > --- a/drivers/devfreq/event/rockchip-dfi.c > +++ b/drivers/devfreq/event/rockchip-dfi.c > @@ -73,9 +73,8 @@ struct rockchip_dfi { > unsigned int max_channels; > }; > > -static void rockchip_dfi_start_hardware_counter(struct devfreq_event_dev > *edev) > +static void rockchip_dfi_start_hardware_counter(struct rockchip_dfi > +*dfi) > { > - struct rockchip_dfi *dfi = devfreq_event_get_drvdata(edev); > void __iomem *dfi_regs = dfi->regs; > > /* clear DDRMON_CTRL setting */ > @@ -103,18 +102,16 @@ static void > rockchip_dfi_start_hardware_counter(struct devfreq_event_dev *edev) > dfi_regs + DDRMON_CTRL); > } > > -static void rockchip_dfi_stop_hardware_counter(struct devfreq_event_dev > *edev) > +static void rockchip_dfi_stop_hardware_counter(struct rockchip_dfi > +*dfi) > { > - struct rockchip_dfi *dfi = devfreq_event_get_drvdata(edev); > void __iomem *dfi_regs = dfi->regs; > > writel_relaxed(HIWORD_UPDATE(0, DDRMON_CTRL_SOFTWARE_EN), > dfi_regs + DDRMON_CTRL); > } > > -static void rockchip_dfi_read_counters(struct devfreq_event_dev *edev, > struct dmc_count *count) > +static void rockchip_dfi_read_counters(struct rockchip_dfi *dfi, struct > +dmc_count *count) > { > - struct rockchip_dfi *dfi = devfreq_event_get_drvdata(edev); > u32 i; > void __iomem *dfi_regs = dfi->regs; > > @@ -132,7 +129,7 @@ static int rockchip_dfi_disable(struct > devfreq_event_dev *edev) { > struct rockchip_dfi *dfi = devfreq_event_get_drvdata(edev); > > - rockchip_dfi_stop_hardware_counter(edev); > + rockchip_dfi_stop_hardware_counter(dfi); > clk_disable_unprepare(dfi->clk); > > return 0; > @@ -149,7 +146,7 @@ static int rockchip_dfi_enable(struct > devfreq_event_dev *edev) > return ret; > } > > - rockchip_dfi_start_hardware_counter(edev); > + rockchip_dfi_start_hardware_counter(dfi); > return 0; > } > > @@ -167,7 +164,7 @@ static int rockchip_dfi_get_event(struct > devfreq_event_dev *edev, > u32 access = 0, total = 0; > int i; > > - rockchip_dfi_read_counters(edev, &count); > + rockchip_dfi_read_counters(dfi, &count); > > /* We can only report one channel, so find the busiest one */ > for (i = 0; i < dfi->max_channels; i++) { > -- > 2.39.2 Applied it. Thanks Best Regards, Chanwoo Choi