[PATCH 02/10] pwm: atmel-hlcdc: Use consistent variable naming

Thierry Reding thierry.reding at gmail.com
Fri Jul 21 11:26:41 PDT 2023


On Fri, Jul 21, 2023 at 07:58:04PM +0200, Uwe Kleine-König wrote:
> Hello Thierry,
> 
> On Thu, Jul 20, 2023 at 09:29:58AM +0200, Uwe Kleine-König wrote:
> > 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önig wrote:
> > > > [...]
> > > > -	struct atmel_hlcdc_pwm *chip = to_atmel_hlcdc_pwm(c);
> > > > -	struct atmel_hlcdc *hlcdc = chip->hlcdc;
> > > > +	struct atmel_hlcdc_pwm *ddata = to_atmel_hlcdc_pwm(chip);
> > > 
> > > 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
> 
> I have to correct this. pwm-atmel-hlcdc only used it after this patch of
> course. But there is pwm-sti which uses it and the two stm32 drivers use
> if for driver data of the pwm's parent device.
> 
> > and git grep '\<ddata\>' 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".
> 
> I noticed you applied my patch and replaced "ddata" by "atmel" without
> mentioning that in the commit log or this thread.
> 
> After my reply above, that's pretty steep.

I didn't think you'd care. I've added a note to the commit message now.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230721/8a266ea6/attachment-0001.sig>


More information about the linux-arm-kernel mailing list