From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8188EB64DA for ; Thu, 20 Jul 2023 07:30:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AzTXgrVmdma39OM4SJlLYymsCKnWRWI88Yk6Jf0cw3E=; b=GXCtCjjWIvPWYA/caGA3HwCS5z N0Zsppbd5GA3boJ74RbIfTQvzRc9D0a+CtYmv3IVAz9FIs9eXktXpvGz1dq1dPB2hNRIbNWqvoxEV w4B6Vn638FXaVSfswX+DyLvWJ2L0FbhRTG7bgxddQkJ9e/98YzRg6c24JtgnTanZyTRed7D7OGUte Fr2lqEy8QKrtQjiLCfW5CxIoxknfGb/MrKdFNaKiVhfuHPc6l4p0XI156SIaQ3L4X3SmymvZJwrAa kMoqOrCUHXs/KJWdamnePiRDQQsSbXDuhjJtg5tjhmrTxKgp9Bi3eQBv3XCBFGZh8zB5jPTNTXkZo tSRbOt7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMO71-00A7vT-0H; Thu, 20 Jul 2023 07:30:11 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMO6y-00A7uW-0d for linux-arm-kernel@lists.infradead.org; Thu, 20 Jul 2023 07:30:09 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qMO6q-0000YU-LC; Thu, 20 Jul 2023 09:30:00 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qMO6p-000mYZ-RE; Thu, 20 Jul 2023 09:29:59 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qMO6p-006IWK-0G; Thu, 20 Jul 2023 09:29:59 +0200 Date: Thu, 20 Jul 2023 09:29:58 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Thierry Reding Subject: Re: [PATCH 02/10] pwm: atmel-hlcdc: Use consistent variable naming Message-ID: <20230720072958.r54d23cefbrytw7r@pengutronix.de> References: <20230714205623.2496590-1-u.kleine-koenig@pengutronix.de> <20230714205623.2496590-3-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 In-Reply-To: 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230720_003008_238920_64565C92 X-CRM114-Status: GOOD ( 22.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Alexandre Belloni , kernel@pengutronix.de, Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============8729970892059013098==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8729970892059013098== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nyhuzpljh2euysuc" Content-Disposition: inline --nyhuzpljh2euysuc Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 20, 2023 at 08:53:50AM +0200, Thierry Reding wrote: > On Fri, Jul 14, 2023 at 10:56:15PM +0200, Uwe Kleine-K=F6nig wrote: > > In pwm drivers the variable name "chip" is usually only used for struct > > pwm_chip pointers. This driver however used "chip" for its driver data > > and pwm_chip pointers are named "chip", too, when there is no driver > > data around and "c" otherwise. Instead use "ddata" for driver data and > > always "chip" for pwm_chips. > >=20 > > Signed-off-by: Uwe Kleine-K=F6nig > > --- > > drivers/pwm/pwm-atmel-hlcdc.c | 64 +++++++++++++++++------------------ > > 1 file changed, 32 insertions(+), 32 deletions(-) > >=20 > > diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcd= c.c > > index 96a709a9d49a..9b0165d61c49 100644 > > --- a/drivers/pwm/pwm-atmel-hlcdc.c > > +++ b/drivers/pwm/pwm-atmel-hlcdc.c > > @@ -38,11 +38,11 @@ static inline struct atmel_hlcdc_pwm *to_atmel_hlcd= c_pwm(struct pwm_chip *chip) > > return container_of(chip, struct atmel_hlcdc_pwm, chip); > > } > > =20 > > -static int atmel_hlcdc_pwm_apply(struct pwm_chip *c, struct pwm_device= *pwm, > > +static int atmel_hlcdc_pwm_apply(struct pwm_chip *chip, struct pwm_dev= ice *pwm, > > const struct pwm_state *state) > > { > > - struct atmel_hlcdc_pwm *chip =3D to_atmel_hlcdc_pwm(c); > > - struct atmel_hlcdc *hlcdc =3D chip->hlcdc; > > + struct atmel_hlcdc_pwm *ddata =3D to_atmel_hlcdc_pwm(chip); >=20 > Can we not just use something like "data", "priv" or "atmel"? "ddata" is > horrific and looks like a typo. I like "ddata" which isn't so uncommon (pwm-atmel-hlcdc and pwm-sifive use it and git grep '\' suggests it's common in other parts of the kernel, too.) It's the same naming scheme as "pdata". If you feel strong here, do you like "drvdata" better? Among your suggestions my favourite is "priv". Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --nyhuzpljh2euysuc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmS44nYACgkQj4D7WH0S /k65swf+PLbiBGLhuJxGlEqCN24bBR//G29XkUvjWFyR+6hndQuidOJ2Z6D9O/cS yX318qTz21VjCccePHn9l72g+zOagM2k+Uk9Sb3CVoRHn7v5OWVGDZD+jDW+JLNW hkhMduEqZCAuAu2e5Mv+uYXNo1iRz7Y1GEWgsFS84Nzi9yobX/477hnAgkSMoKuG 01ogM72EkMHIDneHY9wQ2RNyweJlXOFrIlB+KGRRdZ7X+oGtJ5PDOCORTkeoO/b/ QBLb5x7zlGedjLEYGGy8QBFYMVdQOX9NbPah0PIPcdiT15JCXGudrul9LGBIaKPf aTDwd/oTXhLn+9lPuSTsyCv1bhJV1Q== =Rd0Q -----END PGP SIGNATURE----- --nyhuzpljh2euysuc-- --===============8729970892059013098== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8729970892059013098==--