* [PATCH v3] staging: vt6655: refactor byRadioCtl to radio_ctl
@ 2021-12-03 20:24 Alberto Merciai
2021-12-04 8:38 ` Pavel Skripkin
0 siblings, 1 reply; 2+ messages in thread
From: Alberto Merciai @ 2021-12-03 20:24 UTC (permalink / raw)
To: alb3rt0.m3rciai
Cc: Forest Bond, Greg Kroah-Hartman, Tommaso Merciai,
Aldas Taraškevičius, Dan Carpenter, Karolina Drobnik,
Lucas Henneman, linux-staging, linux-kernel
Replace camelcase hungarian notated variable "byRadioCtl"
into linux kernel coding style equivalent variable "radio_ctl".
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] staging: vt6655: refactor byRadioCtl to radio_ctl
2021-12-03 20:24 [PATCH v3] staging: vt6655: refactor byRadioCtl to radio_ctl Alberto Merciai
@ 2021-12-04 8:38 ` Pavel Skripkin
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Skripkin @ 2021-12-04 8:38 UTC (permalink / raw)
To: Alberto Merciai
Cc: Forest Bond, Greg Kroah-Hartman, Tommaso Merciai,
Aldas Taraškevičius, Dan Carpenter, Karolina Drobnik,
Lucas Henneman, linux-staging, linux-kernel
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@gmail.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-04 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 20:24 [PATCH v3] staging: vt6655: refactor byRadioCtl to radio_ctl Alberto Merciai
2021-12-04 8:38 ` Pavel Skripkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).