Re: [PATCH 02/10] pwm: atmel-hlcdc: Use consistent variable naming
From: Thierry Reding <hidden>
Date: 2023-07-21 18:27:08
Also in:
linux-pwm
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:quoted
On Thu, Jul 20, 2023 at 08:53:50AM +0200, Thierry Reding wrote:quoted
On Fri, Jul 14, 2023 at 10:56:15PM +0200, Uwe Kleine-König wrote:quoted
[...] - 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 itI 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.quoted
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