[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b2741dd-a524-dde1-7aa3-520ce076e3c6@kernel.org>
Date: Sat, 7 Oct 2023 01:04:22 +0900
From: Chanwoo Choi <chanwoo@...nel.org>
To: Sascha Hauer <s.hauer@...gutronix.de>,
linux-rockchip@...ts.infradead.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Heiko Stuebner <heiko@...ech.de>,
Kyungmin Park <kyungmin.park@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>, kernel@...gutronix.de,
Michael Riesch <michael.riesch@...fvision.net>,
Robin Murphy <robin.murphy@....com>,
Vincent Legoll <vincent.legoll@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v7 02/26] PM / devfreq: rockchip-dfi: Embed desc into
private data struct
On 23. 7. 4. 18:32, Sascha Hauer wrote:
> No need for an extra allocation, just embed the struct
> devfreq_event_desc into the private data struct.
>
> Reviewed-by: Heiko Stuebner <heiko@...ech.de>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
> ---
> drivers/devfreq/event/rockchip-dfi.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
> index 74893c06aa087..467f9f42d38f7 100644
> --- a/drivers/devfreq/event/rockchip-dfi.c
> +++ b/drivers/devfreq/event/rockchip-dfi.c
> @@ -49,7 +49,7 @@ struct dmc_usage {
> */
> struct rockchip_dfi {
> struct devfreq_event_dev *edev;
> - struct devfreq_event_desc *desc;
> + struct devfreq_event_desc desc;
> struct dmc_usage ch_usage[RK3399_DMC_NUM_CH];
> struct device *dev;
> void __iomem *regs;
> @@ -204,14 +204,10 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
>
> data->dev = dev;
>
> - desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
> - if (!desc)
> - return -ENOMEM;
> -
> + desc = &data->desc;
> desc->ops = &rockchip_dfi_ops;
> desc->driver_data = data;
> desc->name = np->name;
> - data->desc = desc;
>
> data->edev = devm_devfreq_event_add_edev(&pdev->dev, desc);
> if (IS_ERR(data->edev)) {
Applied it. Thanks.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
Powered by blists - more mailing lists