Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3851554rdg; Wed, 18 Oct 2023 07:51:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtIZap7VsacXEje5BBuerri9UnaoUKac71tvrIN3iU6IrdUsdbCs/Lv2foLQmjMtMRNzeW X-Received: by 2002:a05:6871:8483:b0:1b4:4a2e:33f1 with SMTP id sv3-20020a056871848300b001b44a2e33f1mr6826922oab.29.1697640712999; Wed, 18 Oct 2023 07:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697640712; cv=none; d=google.com; s=arc-20160816; b=X/eg4gh8r6iXPRHXSxobTfwmoZ5ZIyliDFqiu2SJEiEcm2p9gKGbTLQd0r9Wxv0yDG 0ee6OYPq61627542xPvD1m/FiAaZTz+0iHYl+n0DvMy0hgVrpYwVerl42LFKcsNuTLB6 x80uMrsJtawMJ93SoVLKzfk9NIpaNtsyECoAkkOlL8FVhFxe51+3KJbYS0a3/c5jqVRi D/Pp7Sfgtf2dKqd1frVF/X/CIQ8OfUfXfBBzf7ysrad6R09zGeSnlJb/vFG6Y+ELKKn7 xDrM3GyMdOyX9GvE4sSRa2n6qsdwdU+ZXb8Jjgg6FRPbIsk4bhwFULSFfYLzfbq6vae8 kjww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=n8Duzu9+xuQB1FOg4w0YITChnO5Gy6otEv/A4jPIjcw=; fh=kza8t5ZS209zVoEG4uwLJLlWKsmyNnta4nic2PYIVdM=; b=Oz0qoQbXrNAOCPB3ZQAcrSsR968JwXk68q+HD65H8s2XB4Y0+njk+DWFHEqMmPUlWS G5R1EmNfpWAkBvN+GgNmUuU3T/iaBUBGQoSMlxfJ1+O9NZQ7XmD+VFld2CdWm3tuRrHg ysQ6KMCDYaNK51J+CISFch9Scmn/N7rL3QKrdBZxmBMAqnsP2JvhmrjhhbWHZKB0vFqt oE+e30zuyWIi0BpKU6Ink1Qv3L54zzolCiDDhiE4LcFElt+9QGMfSr+6P8zB+wCNxUvO hvET18PbcUCUM5Z0/NzknlcTIScafRN0ah66MwWrwoaUMr/OTiVnBCKwGCK3UzSIUG42 cZyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S878NAwu; 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=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l62-20020a639141000000b005ab22c82042si2461252pge.623.2023.10.18.07.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:51:52 -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=@kernel.org header.s=k20201202 header.b=S878NAwu; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 02D0E81A6E77; Wed, 18 Oct 2023 07:51:45 -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 S1344886AbjJROvf (ORCPT + 99 others); Wed, 18 Oct 2023 10:51:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235238AbjJROve (ORCPT ); Wed, 18 Oct 2023 10:51:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7BDFAB; Wed, 18 Oct 2023 07:51:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E825AC433C8; Wed, 18 Oct 2023 14:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697640692; bh=BbvjjIBqrx4LLuoNVbrW9S9bLaMwRPFS7lIkl7RjLWU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=S878NAwuhe2zWCeS5/FbNtl7dgxsCsVjrg5yCoP67+b2sQKUEsx7TASUDFsIy7jnc NTba6lHdDtNv/X70utYTiM4x7Gp4do6IB8UZLeR0DH9Do7Eqvvt6ZnICWTosJ83zZL WQehJ1HCylF2JMYylUqxv5BnFXcGcCRH7kOAtqVcQOd6224wkOKxp6iqHEkGd3cnAM McITwjuuNDBognSWXeNRwBqN4B5WFfKMAILEAwK7RHMjb171/Hv10pUr3m1Vrf626V htgH5+bmJEF5cAo2TuXM93k/MVH7ZUAR0HH9FXDlxbgfna2E9YfvQDoOOCLE8NV05X x2r8+Vp4D5BOw== Message-ID: <39e1f40f-647a-4c3a-b070-0e504d7d3389@kernel.org> Date: Wed, 18 Oct 2023 23:51:27 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 02/26] PM / devfreq: rockchip-dfi: Embed desc into private data struct Content-Language: en-US To: Sascha Hauer , linux-rockchip@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Heiko Stuebner , 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 , Jonathan Cameron References: <20231018061714.3553817-1-s.hauer@pengutronix.de> <20231018061714.3553817-3-s.hauer@pengutronix.de> From: Chanwoo Choi In-Reply-To: <20231018061714.3553817-3-s.hauer@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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]); Wed, 18 Oct 2023 07:51:45 -0700 (PDT) On 23. 10. 18. 15:16, 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 > Reviewed-by: Jonathan Cameron > Reviewed-by: Sebastian Reichel > Signed-off-by: Sascha Hauer > --- > 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)) { Already applied it on v7. -- Best Regards, Samsung Electronics Chanwoo Choi