Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp990222rdb; Wed, 24 Jan 2024 01:03:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7RJwstX8sJjrXBDLXaOSqcs8phKPsgwYUnDWWMCun4uv5WiIy2ogHF9J+Hmuy6qZIXe4x X-Received: by 2002:a17:907:c08c:b0:a31:30c7:f4a8 with SMTP id st12-20020a170907c08c00b00a3130c7f4a8mr235966ejc.4.1706086996780; Wed, 24 Jan 2024 01:03:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706086996; cv=pass; d=google.com; s=arc-20160816; b=rlN8oI3TkoVgz0dp3wYPW4rzwtCHvZ/uDoF0vZ/PfQwjGWIKHvhr0w55/cZLGkoHi0 f2uwvAE3QC8I0vB/ruryjiJvNKAaPMJYyYWZR7PR6xG0CQd16b4YQCzxzlIBJy4Dh+g7 S11p4x+t3QYCZdBNcOTlBvKqPsPeYNZruYsCNGFqtIKeN/zyt/CmXzdI43lqhfP2ERwE tfyWX2YmnZKWpL+TheQmp/+Xh02kjQnmY3mEgPXlsfgf14Hdj7km54jQewkV+wPTuRr9 W8SxQa2O2sWFfVna34PHJ+2JvXBkj9d4j4vQkbbdN+vFm+mjPmzTof9jrekXgyVnyxY2 Owpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=t3DFTUQH1u9A5wT/u448xbDk+d6abyjuUkKixL+zdew=; fh=02goHv1gf6IZnl+8PZbgYXgaPEv5CNyC0dSuav09zS8=; b=Ux5cADFfzvRGEiQM3jwaPCIxqdBiHFTh+HRBZ/zG51WmwCvXME6mdjkDI6cTYYL6ZK nMvfbsw2p+d9arl++eNLoHGlqYIN7PBsFl7NlRzBrShphWGr4maOSql8uCfYAvWJ8XlO tPcSwXca0021f2aEb8lBSOdSfSZrO/oAbA4NXeauCj691rzm1R/6TRROyqFvvub3OYTm w9YIIUXDFD3j4Dku+q/OIDfUBX/HXBlDPlCrLYR/O6raZNu9gzR47jjmm95p1HXHrOiL I5GkBjLHFgrUCMzbOJeF9PiB7Ys4q2zQP/+9ITpSp74Sk//6ZfGcrrNcnY9/GEULvx4D KQNQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-36673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36673-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id zo19-20020a170906ff5300b00a311a385b83si510255ejb.235.2024.01.24.01.03.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:03:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-36673-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36673-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2B0BF1F2AB36 for ; Wed, 24 Jan 2024 09:03:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61AE717BC7; Wed, 24 Jan 2024 09:02:55 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31A1017BAA for ; Wed, 24 Jan 2024 09:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706086974; cv=none; b=XAAy0rNOJxjidFB3lgzqFlqOnDUvyngttbH0SD2k8ahQrrjFebx8pjjMrTB90V3nL49AgoGtOYayu8mGefcSQinx5MSsRFi7Ct8IieHzdOqsi2nyMB5OethQKnZ0F+O3ikZGYN8qqImpAa5qUCcU8bTMq3wczr0bpL2a/xHlzkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706086974; c=relaxed/simple; bh=IUzPpBw3waxXsmF2u/OJpdQqbjdb1ELOjeunXCIZSuY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FRuaOG+BcnEnfnQPV0DqFWZEM6/nus+YdcWjQxXnWGhQO/paF8vF8FjkZHLKav2DaAkh6GzolebX46dCKmG6Dz6/8VbKOzmshVh97mtTbiYk9YBcQOZO1/HtcH2mGPuQLVFH9V2C8omZ/agwakYxJI6JjgZ/TEGUeZhMMICAcR0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rSZ9d-0001F3-HK; Wed, 24 Jan 2024 10:02:41 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rSZ9c-00217d-KQ; Wed, 24 Jan 2024 10:02:40 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rSZ9c-0070Sy-1j; Wed, 24 Jan 2024 10:02:40 +0100 Date: Wed, 24 Jan 2024 10:02:40 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Jerome Brunet Cc: Thierry Reding , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-pwm@vger.kernel.org, JunYi Zhao Subject: Re: [PATCH v4 5/6] pwm: meson: don't carry internal clock elements around Message-ID: References: <20231222111658.832167-1-jbrunet@baylibre.com> <20231222111658.832167-6-jbrunet@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h373wi4nrohxmd3v" Content-Disposition: inline In-Reply-To: <20231222111658.832167-6-jbrunet@baylibre.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --h373wi4nrohxmd3v Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 22, 2023 at 12:16:53PM +0100, Jerome Brunet wrote: > Pointers to the internal clock elements of the PWM are useless > after probe. There is no need to carry this around in the device > data. Just let devres deal with it. >=20 > Signed-off-by: Jerome Brunet > --- > drivers/pwm/pwm-meson.c | 67 ++++++++++++++++++++++++----------------- > 1 file changed, 39 insertions(+), 28 deletions(-) >=20 > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c > index 15c44185d784..fb113bc8da29 100644 > --- a/drivers/pwm/pwm-meson.c > +++ b/drivers/pwm/pwm-meson.c > @@ -90,9 +90,6 @@ struct meson_pwm_channel { > unsigned int hi; > unsigned int lo; > =20 > - struct clk_mux mux; > - struct clk_divider div; > - struct clk_gate gate; > struct clk *clk; > }; > =20 > @@ -442,6 +439,13 @@ static int meson_pwm_init_channels(struct device *de= v) > struct meson_pwm_channel *channel =3D &meson->channels[i]; > struct clk_parent_data div_parent =3D {}, gate_parent =3D {}; > struct clk_init_data init =3D {}; > + struct clk_divider *div; > + struct clk_gate *gate; > + struct clk_mux *mux; > + > + mux =3D devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); > + if (!mux) > + return -ENOMEM; I don't like this change. While it doesn't increase the memory used, it fragments the used memory and increases the overhead of memory management and the number of devm allocations. Are these members of meson_pwm_channel in the way for anything later? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --h373wi4nrohxmd3v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmWw0i8ACgkQj4D7WH0S /k683gf9GGBr93JUCS2xEl/m1YAKTTgHqxB2JExfwiC6KJfo/FURTvQbLwW4gtu9 BqujrqKJuEIj5YPmfS2DfmnGEQteeSmoeb6vtHwsKyehVtqSqDOF/1ZPSIakbMdx hE3kSBmZVCVPwj9s1JoNAlR+AtWRnzVYUdF40iEjJ6VPhWZB9Swh9KJhNfWAuUIg KxSIivAcwtRrtX9ThjzjKj5sPWGqdaVGTFxir66leKCCmsboGdDOAV60d39u0bSY cDXdp36+vG5DQh1bpjAUE7S/+URvABaCmV8CKBRpMSfyxLo9M65b8VlZS1Q36pl0 ljk2vMhvu45fpewQYEgUv6kO82pUfw== =J1Jy -----END PGP SIGNATURE----- --h373wi4nrohxmd3v--