Re: [PATCH 00/10] pwm: Constistenly name pwm_chip variables "chip"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Jul 14, 2023 at 10:56:13PM +0200, Uwe Kleine-König wrote:
> while working on an extension for the pwm framework, I noticed that some
> drivers and even the core only nearly consistently named all variables
> and struct members holding a pointer to a struct pwm_chip "chip":
> $ git grep -Pho 'struct pwm_chip \**[a-z0-9_]+(*nla:[\(a-z0-9_])' v6.5-rc1 | sort | uniq -c | sort -n
>       1 struct pwm_chip *pwm
>       1 struct pwm_chip pwm
>       1 struct pwm_chip pwm_chip
>       2 struct pwm_chip *_chip
>       4 struct pwm_chip *c
>       8 struct pwm_chip *pc
>      57 struct pwm_chip chip
>     358 struct pwm_chip *chip
> With this series applied these are all called "chip" with one exception:
> The led driver drivers/leds/rgb/leds-qcom-lpg.c uses "pwm". Maybe
> "pwmchip" would be a better name, but I'm not sure that using "chip" was
> an improvement there as this isn't a pure pwm driver. I'm not touching
> that one.
> The first offenders I found were the core and the atmel-hlcdc driver.
> After I found these I optimistically assumed these were the only ones
> with the unusual names and send patches for these out individually
> before checking systematically.
> The atmel-hlcdc patch is included here unchanged, the core patch now
> also adapted the declaration of the changed functions in <linux/pwm.h>.
> I marked these two as "superseded" in patchwork already.
> All patches in this series are pairwise independent of each other. I
> don't know if the staging patch should better go in via the greybus tree
> or via pwm. Both is possible without needing coordination.
> Best regards
> Uwe
> Uwe Kleine-König (10):
>   pwm: Use a consistent name for pwm_chip pointers in the core
>   pwm: atmel-hlcdc: Use consistent variable naming
>   pwm: bcm-kona: Consistenly name pwm_chip variables "chip"
>   pwm: crc: Consistenly name pwm_chip variables "chip"
>   pwm: cros-ec: Consistenly name pwm_chip variables "chip"
>   pwm: lp3943: Consistenly name pwm_chip variables "chip"
>   pwm: rockchip: Consistenly name pwm_chip variables "chip"
>   pwm: sifive: Consistenly name pwm_chip variables "chip"
>   pwm: sl28cpld: Consistenly name pwm_chip variables "chip"
>   staging: greybus: pwm: Consistenly name pwm_chip variables "chip"

This would've been much easier if it had been a single patch. Now I have
to either make you redo the whole series because you've misspelled PWM
or I have to go and update it myself in most of the above patches. Hint:
I'll do the latter.

There is really no reason to split this up into this many patches for
such a trivial change.


Attachment: signature.asc
Description: PGP signature

greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx

[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux