lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 10 Feb 2022 08:40:46 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     zhaoxiao <zhaoxiao@...ontech.com>
Cc:     thierry.reding@...il.com, lee.jones@...aro.org,
        linux-arm-kernel@...ts.infradead.org, linux-pwm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: vt8500: Rename variable pointing to driver private
 data

On Wed, Feb 09, 2022 at 02:47:55PM +0800, zhaoxiao wrote:
> Status quo is that variables of type struct vt8500_chip * are named
> "pwm", "chip" or "pc". The two formers are all not optimal because

There are no variables named "pwm" or "pc".

> usually only struct pwm_device * variables are named "pwm" and "chip" is
> usually used for variabled of type struct pwm_chip *.
> 
> So consistently use the same and non-conflicting name "pc".

The intention is fine, but you missed a few instances that are named
"vt8500". The statistic in mainline looks as follows:

	$ git grep -o -h -E 'struct vt8500_chip \*[a-zA-Z0-9_]*' linus/master drivers/pwm/pwm-vt8500.c | sort | uniq -c
	      2 struct vt8500_chip *chip
	      5 struct vt8500_chip *vt8500

(So there 2 variabled named "chip" (that you renamed to "pc") and 5 that
are named "vt8500". I prefer to rename the "chip"s to "vt8500".

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (485 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ