Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1534970rwd; Tue, 13 Jun 2023 10:20:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4STnQ6uO3SYk5Xdoq/EoJKtyJTNOgb4LkB5OvxkoLsKW/tMsfcOz1rQhVfme1ZZ55ETkVi X-Received: by 2002:a17:90a:8b92:b0:256:5a84:c837 with SMTP id z18-20020a17090a8b9200b002565a84c837mr9884743pjn.39.1686676836289; Tue, 13 Jun 2023 10:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686676836; cv=none; d=google.com; s=arc-20160816; b=O9NFP73EXNoKEJa5Jy/xkKnsHYNYqJZUckEADFYdVOkKClZvuoe3nqXtaGwGiu6j2H ub10FMYc3F15c/2AC/7a5zOReRLJ1DZwpsh9a018cildqzV615cWW2J4MQ4a3K77bJxM kuiGPAkGuP4r3wVK1Dg1HmLfqf96AQnnlX5upL00jvaLd4yUAbiSBlvNkXnv6x8HpKz2 fPI3hNnF5fZZpTbBbIQvG6cQ6E+kgGoGiK+DQaade2Hbo6o+jWpHQxQWr8ZIHyeDCYGF lsONjINiyQ8gAelLulQh2vt2EupmMT60Lmmnda1ZCRZZ6gbiTclmSgwOaziMM/0LVvZ/ 3Vdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v+HOot+dszWBghyHUVVHwoIjveQlR3LQcjq+tHfmc04=; b=VJBAZmUOYRSbUcHOfo09l5HmNk2Kkk/wUsyKREo+fYdI2KV+5orc8m8P1MHNh6JfZk jcgAZof1L8uQIiM7ogGXFaG7dpBN2N/2jcIWdnj8XU2nDNdqXcB5y0BtYL5qiLTD80O5 7umHh9OFIMR46g/eaIluLm1hda8V7ko8kCpccJ0XRq9OM/amRUNUfqPdseaXv4ZSaf9F W0oLe0+8a9BVeCPTfzq5W5CQIu1eb40nWIYrIQtegMl7LL26dFhUUQ/pVRA5AqdWynH5 Wj7lQ2GBClfG2ayGXJfwvn5hXXMN8+Y9S+pUtu8+6hKcCOWAuXZIW5+/GRp2AIgBe65b WCiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cG7lOXde; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a637052000000b0053f2c198398si8673700pgn.888.2023.06.13.10.20.24; Tue, 13 Jun 2023 10:20:36 -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; dkim=pass header.i=@collabora.com header.s=mail header.b=cG7lOXde; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243157AbjFMQWx (ORCPT + 99 others); Tue, 13 Jun 2023 12:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243075AbjFMQWs (ORCPT ); Tue, 13 Jun 2023 12:22:48 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CE761BEC; Tue, 13 Jun 2023 09:22:20 -0700 (PDT) Received: from mercury (dyndsl-091-248-189-170.ewe-ip-backbone.de [91.248.189.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1FC0E6606EF9; Tue, 13 Jun 2023 17:22:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1686673339; bh=MADM0OvComNnVgRiTtbdHEXJKTfQ5wtfSsTHqpNZ7+Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cG7lOXdeYoK/EWOb0ByXUM8o7LL/QXTRtRP9r7fzeNr2SsPnglx5QGOR2u3xtyLzq +/9z8neWmJLvxJn9IbHrX6FoDT2HVS9fLS+DYBK/KgGJrs4hc/rNKAe3Gia6PUH1PF DuiU3FnEmYEo3ffkyXG98y8h6UvIHVgChwrKPAMKTNe0gDZmRds060hnSmKWWYJUNx aVaoB2GlaSx6iiBc9rEBLQsTlfOOWSGE6pPsq4XEpO9Ez6sS2sYagf445F0h6fQN9E V/qB43D5b4bdatSJIlqKzPheZeKdgmCBy3WKCGpoVhYRUFS9t5CsyBZADZeBV6Rl6+ chCQ8hfE8NNlQ== Received: by mercury (Postfix, from userid 1000) id 3BC991066FBA; Tue, 13 Jun 2023 18:22:17 +0200 (CEST) Date: Tue, 13 Jun 2023 18:22:17 +0200 From: Sebastian Reichel To: Sascha Hauer Cc: linux-rockchip@lists.infradead.org, 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, Jonathan Cameron Subject: Re: [PATCH v5 02/25] PM / devfreq: rockchip-dfi: Embed desc into private data struct Message-ID: <20230613162217.auqdeogoxs35fuqe@mercury.elektranox.org> References: <20230524083153.2046084-1-s.hauer@pengutronix.de> <20230524083153.2046084-3-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jfxv54ui2trftfa7" Content-Disposition: inline In-Reply-To: <20230524083153.2046084-3-s.hauer@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 --jfxv54ui2trftfa7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, May 24, 2023 at 10:31:30AM +0200, Sascha Hauer wrote: > No need for an extra allocation, just embed the struct > devfreq_event_desc into the private data struct. >=20 > Signed-off-by: Sascha Hauer > Reviewed-by: Heiko Stuebner > Reviewed-by: Jonathan Cameron > --- Reviewed-by: Sebastian Reichel -- Sebastian > drivers/devfreq/event/rockchip-dfi.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) >=20 > 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_devic= e *pdev) > =20 > data->dev =3D dev; > =20 > - desc =3D devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); > - if (!desc) > - return -ENOMEM; > - > + desc =3D &data->desc; > desc->ops =3D &rockchip_dfi_ops; > desc->driver_data =3D data; > desc->name =3D np->name; > - data->desc =3D desc; > =20 > data->edev =3D devm_devfreq_event_add_edev(&pdev->dev, desc); > if (IS_ERR(data->edev)) { > --=20 > 2.39.2 >=20 --jfxv54ui2trftfa7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmSIl7gACgkQ2O7X88g7 +pqavg//eGagVO58ELSDQgmcdseNzq5Z+G6qMNxVtz7FQsw+l/RWj2SPWK2u4g/a sQ2WAQyE2/f/VIt3kp0evIvau8xhc77d84NCfuNOYHeWKsmnH81opNj5n5PiGAzK iNwCRyecDGgOvar0ZqK+4RWS/+h0K//WH/dq85ssVMkkFye8GMTlYszbDWka5p98 BGQNHW7EuT8qCsni4haqU0CfW9/P0fSMPBjjygittVYlXu1Om2VCTBZpeB9uF6iQ 4hMJx9ih76+K4kQBMvxArKQOkZYBGYIUfjY97lH/YKZvrGf88Hm5RV2HiWzhN9v2 GUmxqlq/A2pyPBhlbRhZZNf/0At99qGKIUwyffLW5+6YLFgAtAysRleRmd2BpkXn WrVsggohh0L0oaW4RWKeyT6/ZtcJ5qD9e1vari6JF0S+5+W+1CHtvEY+yQa3kekD WVuc1HtRNeqkqjgiO9I051BOepkIrb6RTGJPi6Rsotz5QIQatW7GzhwUhhT0cDUs f3ZcRjTvABqOfEVq4Y+ybEpcrhmlUW4hUPJjNsztf86D4mwAtUaRebpFof8NkJVn 9g3322XfKBBxRfMlnwYVeT7oNuMurn7YuyUvfydFSNyuxXYUdQEDj+Y2UQ2luBi8 IVunO3oplN9wAXOJHhYUsS//sGUeDNhcD7YwzSdxVnOs4ow2DVg= =XyGu -----END PGP SIGNATURE----- --jfxv54ui2trftfa7--