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]
Message-ID: <19041795-e692-dd19-c14f-cd951bc7a3de@gmail.com>
Date:   Sat, 4 Dec 2021 11:38:16 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Alberto Merciai <alb3rt0.m3rciai@...il.com>
Cc:     Forest Bond <forest@...ttletooquiet.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tommaso Merciai <tomm.merciai@...il.com>,
        Aldas Taraškevičius <aldas60@...il.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Karolina Drobnik <karolinadrobnik@...il.com>,
        Lucas Henneman <lucas.henneman@...aro.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: vt6655: refactor byRadioCtl to radio_ctl

On 12/3/21 23:24, Alberto Merciai wrote:
> Replace camelcase hungarian notated variable "byRadioCtl"
> into linux kernel coding style equivalent variable "radio_ctl".
> 
> Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@...il.com>
> ---
> 
> v2 -> v3
> - replace typo inside mail message body
> v1 -> v2
> - Correct mail subject
> 
>   drivers/staging/vt6655/device.h      | 2 +-
>   drivers/staging/vt6655/device_main.c | 8 ++++----
>   2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> index c51eba94230d..245f992e5a23 100644
> --- a/drivers/staging/vt6655/device.h
> +++ b/drivers/staging/vt6655/device.h
> @@ -227,7 +227,7 @@ struct vnt_private {
>   	bool bPWBitOn;
>   
>   	/* GPIO Radio Control */
> -	unsigned char byRadioCtl;
> +	unsigned char radio_ctl;
>   	unsigned char byGPIO;
>   	bool hw_radio_off;
>   	bool bPrvActive4RadioOFF;
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index 897d70cf32b8..37a82550ca82 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -371,18 +371,18 @@ static void device_init_registers(struct vnt_private *priv)
>   
>   	priv->radio_off = false;
>   
> -	priv->byRadioCtl = SROMbyReadEmbedded(priv->port_offset,
> +	priv->radio_ctl = SROMbyReadEmbedded(priv->port_offset,
>   					      EEP_OFS_RADIOCTL);
>   	priv->hw_radio_off = false;
>   
> -	if (priv->byRadioCtl & EEP_RADIOCTL_ENABLE) {
> +	if (priv->radio_ctl & EEP_RADIOCTL_ENABLE) {
>   		/* Get GPIO */
>   		MACvGPIOIn(priv->port_offset, &priv->byGPIO);
>   
>   		if (((priv->byGPIO & GPIO0_DATA) &&
> -		     !(priv->byRadioCtl & EEP_RADIOCTL_INV)) ||
> +		     !(priv->radio_ctl & EEP_RADIOCTL_INV)) ||
>   		     (!(priv->byGPIO & GPIO0_DATA) &&
> -		     (priv->byRadioCtl & EEP_RADIOCTL_INV)))
> +		     (priv->radio_ctl & EEP_RADIOCTL_INV)))
>   			priv->hw_radio_off = true;
>   	}
>   
> 

This one is odd. Code uses byRadioCtl as local storage to check register 
value within one function...

I might be missing something, but I think, it can be removed as well.




With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ