[PATCH v6 126/164] pwm: sun4i: Consistently name driver data sun4ichip
Jernej Škrabec
jernej.skrabec at gmail.com
Wed Feb 14 10:20:12 PST 2024
Dne sreda, 14. februar 2024 ob 10:32:53 CET je Uwe Kleine-König napisal(a):
> The driver uses three different names for variables of type
> sun4i_pwm_chip:
>
> $ git grep 'struct sun4i_pwm_chip \*' v6.8-rc1 -- drivers/pwm/pwm-sun4i.c
> v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline struct sun4i_pwm_chip *to_sun4i_pwm_chip(struct pwm_chip *chip)
> v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline u32 sun4i_pwm_readl(struct sun4i_pwm_chip *chip,
> v6.8-rc1:drivers/pwm/pwm-sun4i.c:static inline void sun4i_pwm_writel(struct sun4i_pwm_chip *chip,
> v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4i_pwm = to_sun4i_pwm_chip(chip);
> v6.8-rc1:drivers/pwm/pwm-sun4i.c:static int sun4i_pwm_calculate(struct sun4i_pwm_chip *sun4i_pwm,
> v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4i_pwm = to_sun4i_pwm_chip(chip);
> v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4ichip;
> v6.8-rc1:drivers/pwm/pwm-sun4i.c: struct sun4i_pwm_chip *sun4ichip = platform_get_drvdata(pdev);
>
> "chip" is usually reserved for variables of type struct pwm_chip. So
> pick sun4ichip as common name which better matches the type name than
> sun4i_pwm.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
Best regards,
Jernej
More information about the linux-arm-kernel
mailing list