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

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jul 21 10:58:04 PDT 2023


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.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230721/2e2aba7f/attachment-0001.sig>


More information about the linux-arm-kernel mailing list