2023-10-16 23:01:10

by Gilbert Adikankwu

[permalink] [raw]
Subject: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

Make the variable names adhere to Linux kernel coding style and mute
checkpatch.pl errors.

Gilbert Adikankwu (4):
staging: vt6655: Rename variable bUpdateBBVGA
staging: vt6655: Rename variable byCurrentCh
staging: vt6655: Rename variable byCurPwr
staging: vt6655: Rename variable byBBPreEDRSSI

drivers/staging/vt6655/baseband.c | 2 +-
drivers/staging/vt6655/channel.c | 18 +++++++++---------
drivers/staging/vt6655/device.h | 8 ++++----
drivers/staging/vt6655/device_main.c | 8 ++++----
drivers/staging/vt6655/dpc.c | 2 +-
drivers/staging/vt6655/rf.c | 4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)

--
2.34.1


2023-10-16 23:01:13

by Gilbert Adikankwu

[permalink] [raw]
Subject: [PATCH 2/4] staging: vt6655: Rename variable byCurrentCh

Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase.

Mute checkpatch.pl error:

CHECK: Avoid CamelCase: <byCurrentCh>

Signed-off-by: Gilbert Adikankwu <[email protected]>
---
drivers/staging/vt6655/channel.c | 12 ++++++------
drivers/staging/vt6655/device.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index c11bc2dbc356..7b864136a0a8 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -82,7 +82,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
{
bool ret = true;

- if (priv->byCurrentCh == ch->hw_value)
+ if (priv->current_ch == ch->hw_value)
return ret;

/* Set VGA to max sensitivity */
@@ -100,7 +100,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
* it is for better TX throughput
*/

- priv->byCurrentCh = ch->hw_value;
+ priv->current_ch = ch->hw_value;
ret &= RFbSelectChannel(priv, priv->rf_type,
ch->hw_value);

@@ -117,9 +117,9 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)

/* set HW default power register */
VT6655_MAC_SELECT_PAGE1(priv->port_offset);
- RFbSetPower(priv, RATE_1M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_1M, priv->current_ch);
iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWRCCK);
- RFbSetPower(priv, RATE_6M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_6M, priv->current_ch);
iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWROFDM);
VT6655_MAC_SELECT_PAGE0(priv->port_offset);

@@ -127,9 +127,9 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
}

if (priv->byBBType == BB_TYPE_11B)
- RFbSetPower(priv, RATE_1M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_1M, priv->current_ch);
else
- RFbSetPower(priv, RATE_6M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_6M, priv->current_ch);

return ret;
}
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index b166d296b82d..b3ac6237010b 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -239,7 +239,7 @@ struct vnt_private {
bool bIsBeaconBufReadySet;
unsigned int cbBeaconBufReadySetCnt;
bool bFixRate;
- u16 byCurrentCh;
+ u16 current_ch;

bool bAES;

--
2.34.1

2023-10-16 23:01:16

by Gilbert Adikankwu

[permalink] [raw]
Subject: [PATCH 1/4] staging: vt6655: Rename variable bUpdateBBVGA

Remove bool Type encoding "b" from variable name and replace camelcase
with snakecase.

Mute checkpatch.pl error:

CHECK: Avoid CamelCase: <bUpdateBBVGA>

Signed-off-by: Gilbert Adikankwu <[email protected]>
---
drivers/staging/vt6655/baseband.c | 2 +-
drivers/staging/vt6655/channel.c | 2 +-
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 7d47b266b87e..f7824396c5ff 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2087,7 +2087,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
/* {{ RobertYu: 20050104 */
} else {
/* No VGA Table now */
- priv->bUpdateBBVGA = false;
+ priv->update_bbvga = false;
priv->bbvga[0] = 0x1C;
}

diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index 6ac7d470c041..c11bc2dbc356 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -86,7 +86,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
return ret;

/* Set VGA to max sensitivity */
- if (priv->bUpdateBBVGA &&
+ if (priv->update_bbvga &&
priv->bbvga_current != priv->bbvga[0]) {
priv->bbvga_current = priv->bbvga[0];

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 68bfadacfa7c..b166d296b82d 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -246,7 +246,7 @@ struct vnt_private {
unsigned char byAutoFBCtrl;

/* For Update BaseBand VGA Gain Offset */
- bool bUpdateBBVGA;
+ bool update_bbvga;
unsigned int uBBVGADiffCount;
unsigned char bbvga_new;
unsigned char bbvga_current;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b08fcf7e6edc..b654fc24d725 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -179,7 +179,7 @@ device_set_options(struct vnt_private *priv)
priv->byBBType = priv->opts.bbp_type;
priv->byPacketType = priv->byBBType;
priv->byAutoFBCtrl = AUTO_FB_0;
- priv->bUpdateBBVGA = true;
+ priv->update_bbvga = true;
priv->preamble_type = 0;

pr_debug(" byShortRetryLimit= %d\n", (int)priv->byShortRetryLimit);
@@ -423,7 +423,7 @@ static void device_init_registers(struct vnt_private *priv)
/* initialize BBP registers */
bb_vt3253_init(priv);

- if (priv->bUpdateBBVGA) {
+ if (priv->update_bbvga) {
priv->bbvga_current = priv->bbvga[0];
priv->bbvga_new = priv->bbvga_current;
bb_set_vga_gain_offset(priv, priv->bbvga[0]);
@@ -1040,7 +1040,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
long dbm;
int i;

- if (!priv->bUpdateBBVGA)
+ if (!priv->update_bbvga)
return;

if (priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
--
2.34.1

2023-10-16 23:01:22

by Gilbert Adikankwu

[permalink] [raw]
Subject: [PATCH 3/4] staging: vt6655: Rename variable byCurPwr

Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase

Mute checkpatch.pl error:

CHECK: Avoid CamelCase: <byCurPwr>

Signed-off-by: Gilbert Adikankwu <[email protected]>
---
drivers/staging/vt6655/channel.c | 4 ++--
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 2 +-
drivers/staging/vt6655/rf.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index 7b864136a0a8..771c1364b0f0 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -118,9 +118,9 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
/* set HW default power register */
VT6655_MAC_SELECT_PAGE1(priv->port_offset);
RFbSetPower(priv, RATE_1M, priv->current_ch);
- iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWRCCK);
+ iowrite8(priv->cur_pwr, priv->port_offset + MAC_REG_PWRCCK);
RFbSetPower(priv, RATE_6M, priv->current_ch);
- iowrite8(priv->byCurPwr, priv->port_offset + MAC_REG_PWROFDM);
+ iowrite8(priv->cur_pwr, priv->port_offset + MAC_REG_PWROFDM);
VT6655_MAC_SELECT_PAGE0(priv->port_offset);

spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index b3ac6237010b..6df1694d556b 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -264,7 +264,7 @@ struct vnt_private {
/* For RF Power table */
unsigned char byCCKPwr;
unsigned char byOFDMPwrG;
- unsigned char byCurPwr;
+ unsigned char cur_pwr;
char byCurPwrdBm;
unsigned char abyCCKPwrTbl[CB_MAX_CHANNEL_24G + 1];
unsigned char abyOFDMPwrTbl[CB_MAX_CHANNEL + 1];
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b654fc24d725..2152c6850e61 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -359,7 +359,7 @@ static void device_init_registers(struct vnt_private *priv)
RFbInit(priv);

/* Get Desire Power Value */
- priv->byCurPwr = 0xFF;
+ priv->cur_pwr = 0xFF;
priv->byCCKPwr = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_PWR_CCK);
priv->byOFDMPwrG = SROMbyReadEmbedded(priv->port_offset,
EEP_OFS_PWR_OFDMG);
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index bf9a10563b12..d319ec21c97b 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -438,12 +438,12 @@ bool RFbSetPower(struct vnt_private *priv, unsigned int rate, u16 uCH)
break;
}

- if (priv->byCurPwr == byPwr)
+ if (priv->cur_pwr == byPwr)
return true;

ret = RFbRawSetPower(priv, byPwr, rate);
if (ret)
- priv->byCurPwr = byPwr;
+ priv->cur_pwr = byPwr;

return ret;
}
--
2.34.1

2023-10-16 23:01:32

by Gilbert Adikankwu

[permalink] [raw]
Subject: [PATCH 4/4] staging: vt6655: Rename variable byBBPreEDRSSI

Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase.

Mute checkpatch error:

CHECK: Avoid CamelCase: <byBBPreEDRSSI>

Signed-off-by: Gilbert Adikankwu <[email protected]>
---
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/dpc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 6df1694d556b..2b5f9bf6aa5d 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -253,7 +253,7 @@ struct vnt_private {
unsigned char bbvga[BB_VGA_LEVEL];
long dbm_threshold[BB_VGA_LEVEL];

- unsigned char byBBPreEDRSSI;
+ unsigned char bb_pre_edrssi;
unsigned char byBBPreEDIndex;

unsigned long dwDiagRefCount;
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index c6ed3537f439..7ada188e2048 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -79,7 +79,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,

RFvRSSITodBm(priv, *rssi, &rx_dbm);

- priv->byBBPreEDRSSI = (u8)rx_dbm + 1;
+ priv->bb_pre_edrssi = (u8)rx_dbm + 1;
priv->current_rssi = *rssi;

skb_pull(skb, 4);
--
2.34.1

2023-10-17 04:48:15

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: vt6655: Rename variable bUpdateBBVGA



On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:

> Remove bool Type encoding "b" from variable name and replace camelcase
> with snakecase.
>
> Mute checkpatch.pl error:
>
> CHECK: Avoid CamelCase: <bUpdateBBVGA>
>
> Signed-off-by: Gilbert Adikankwu <[email protected]>
> ---
> drivers/staging/vt6655/baseband.c | 2 +-
> drivers/staging/vt6655/channel.c | 2 +-
> drivers/staging/vt6655/device.h | 2 +-
> drivers/staging/vt6655/device_main.c | 6 +++---
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> index 7d47b266b87e..f7824396c5ff 100644
> --- a/drivers/staging/vt6655/baseband.c
> +++ b/drivers/staging/vt6655/baseband.c
> @@ -2087,7 +2087,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
> /* {{ RobertYu: 20050104 */
> } else {
> /* No VGA Table now */
> - priv->bUpdateBBVGA = false;
> + priv->update_bbvga = false;
> priv->bbvga[0] = 0x1C;

I wonder about the name bbvga in the line above. Does the initial b mean
byte or is it a lowercase version of BBVGA?

julia

> }
>
> diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
> index 6ac7d470c041..c11bc2dbc356 100644
> --- a/drivers/staging/vt6655/channel.c
> +++ b/drivers/staging/vt6655/channel.c
> @@ -86,7 +86,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
> return ret;
>
> /* Set VGA to max sensitivity */
> - if (priv->bUpdateBBVGA &&
> + if (priv->update_bbvga &&
> priv->bbvga_current != priv->bbvga[0]) {
> priv->bbvga_current = priv->bbvga[0];
>
> diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> index 68bfadacfa7c..b166d296b82d 100644
> --- a/drivers/staging/vt6655/device.h
> +++ b/drivers/staging/vt6655/device.h
> @@ -246,7 +246,7 @@ struct vnt_private {
> unsigned char byAutoFBCtrl;
>
> /* For Update BaseBand VGA Gain Offset */
> - bool bUpdateBBVGA;
> + bool update_bbvga;
> unsigned int uBBVGADiffCount;
> unsigned char bbvga_new;
> unsigned char bbvga_current;
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index b08fcf7e6edc..b654fc24d725 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -179,7 +179,7 @@ device_set_options(struct vnt_private *priv)
> priv->byBBType = priv->opts.bbp_type;
> priv->byPacketType = priv->byBBType;
> priv->byAutoFBCtrl = AUTO_FB_0;
> - priv->bUpdateBBVGA = true;
> + priv->update_bbvga = true;
> priv->preamble_type = 0;
>
> pr_debug(" byShortRetryLimit= %d\n", (int)priv->byShortRetryLimit);
> @@ -423,7 +423,7 @@ static void device_init_registers(struct vnt_private *priv)
> /* initialize BBP registers */
> bb_vt3253_init(priv);
>
> - if (priv->bUpdateBBVGA) {
> + if (priv->update_bbvga) {
> priv->bbvga_current = priv->bbvga[0];
> priv->bbvga_new = priv->bbvga_current;
> bb_set_vga_gain_offset(priv, priv->bbvga[0]);
> @@ -1040,7 +1040,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
> long dbm;
> int i;
>
> - if (!priv->bUpdateBBVGA)
> + if (!priv->update_bbvga)
> return;
>
> if (priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> --
> 2.34.1
>
>
>

2023-10-17 06:20:04

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

On 10/17/23 00:58, Gilbert Adikankwu wrote:
> Make the variable names adhere to Linux kernel coding style and mute
> checkpatch.pl errors.
>
> Gilbert Adikankwu (4):
> staging: vt6655: Rename variable bUpdateBBVGA
> staging: vt6655: Rename variable byCurrentCh
> staging: vt6655: Rename variable byCurPwr
> staging: vt6655: Rename variable byBBPreEDRSSI
>
> drivers/staging/vt6655/baseband.c | 2 +-
> drivers/staging/vt6655/channel.c | 18 +++++++++---------
> drivers/staging/vt6655/device.h | 8 ++++----
> drivers/staging/vt6655/device_main.c | 8 ++++----
> drivers/staging/vt6655/dpc.c | 2 +-
> drivers/staging/vt6655/rf.c | 4 ++--
> 6 files changed, 21 insertions(+), 21 deletions(-)
>

Hi,

- if (priv->byCurrentCh == ch->hw_value)
+ if (priv->current_ch == ch->hw_value)^M
return ret;

ERROR: DOS line endings

What does the "^M" at the end of the new line?
Did you run checkpatch on your patches?

Thanks

Bye

Philipp



2023-10-17 07:20:01

by Gilbert Adikankwu

[permalink] [raw]
Subject: Re: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

On Tue, Oct 17, 2023 at 08:19:49AM +0200, Philipp Hortmann wrote:
> On 10/17/23 00:58, Gilbert Adikankwu wrote:
> > Make the variable names adhere to Linux kernel coding style and mute
> > checkpatch.pl errors.
> >
> > Gilbert Adikankwu (4):
> > staging: vt6655: Rename variable bUpdateBBVGA
> > staging: vt6655: Rename variable byCurrentCh
> > staging: vt6655: Rename variable byCurPwr
> > staging: vt6655: Rename variable byBBPreEDRSSI
> >
> > drivers/staging/vt6655/baseband.c | 2 +-
> > drivers/staging/vt6655/channel.c | 18 +++++++++---------
> > drivers/staging/vt6655/device.h | 8 ++++----
> > drivers/staging/vt6655/device_main.c | 8 ++++----
> > drivers/staging/vt6655/dpc.c | 2 +-
> > drivers/staging/vt6655/rf.c | 4 ++--
> > 6 files changed, 21 insertions(+), 21 deletions(-)
> >
>
> Hi,
>
> - if (priv->byCurrentCh == ch->hw_value)
> + if (priv->current_ch == ch->hw_value)^M
> return ret;
>
> ERROR: DOS line endings
>
> What does the "^M" at the end of the new line?
> Did you run checkpatch on your patches?
>
> Thanks
>
> Bye
>
> Philipp

Hello,

I do not know what this error means. If anything, I'm surprised there is
an error. checkpatch is hooked to my git commit and all the patches
built cleanly on my machine. I will resend now.

Thanks
Gilbert

2023-10-17 07:31:21

by Gilbert Adikankwu

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: vt6655: Rename variable bUpdateBBVGA

On Tue, Oct 17, 2023 at 06:48:00AM +0200, Julia Lawall wrote:
>
>
> On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
>
> > Remove bool Type encoding "b" from variable name and replace camelcase
> > with snakecase.
> >
> > Mute checkpatch.pl error:
> >
> > CHECK: Avoid CamelCase: <bUpdateBBVGA>
> >
> > Signed-off-by: Gilbert Adikankwu <[email protected]>
> > ---
> > drivers/staging/vt6655/baseband.c | 2 +-
> > drivers/staging/vt6655/channel.c | 2 +-
> > drivers/staging/vt6655/device.h | 2 +-
> > drivers/staging/vt6655/device_main.c | 6 +++---
> > 4 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> > index 7d47b266b87e..f7824396c5ff 100644
> > --- a/drivers/staging/vt6655/baseband.c
> > +++ b/drivers/staging/vt6655/baseband.c
> > @@ -2087,7 +2087,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
> > /* {{ RobertYu: 20050104 */
> > } else {
> > /* No VGA Table now */
> > - priv->bUpdateBBVGA = false;
> > + priv->update_bbvga = false;
> > priv->bbvga[0] = 0x1C;
>
> I wonder about the name bbvga in the line above. Does the initial b mean
> byte or is it a lowercase version of BBVGA?
>
> julia

Hello,

bbvga is lowercase version of BBGVA. It was added with this commit 11b896e65f4bff7e412b3abca366ea0bdadc8834

Thanks
Gilbert
>
> > }
> >
> > diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
> > index 6ac7d470c041..c11bc2dbc356 100644
> > --- a/drivers/staging/vt6655/channel.c
> > +++ b/drivers/staging/vt6655/channel.c
> > @@ -86,7 +86,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
> > return ret;
> >
> > /* Set VGA to max sensitivity */
> > - if (priv->bUpdateBBVGA &&
> > + if (priv->update_bbvga &&
> > priv->bbvga_current != priv->bbvga[0]) {
> > priv->bbvga_current = priv->bbvga[0];
> >
> > diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> > index 68bfadacfa7c..b166d296b82d 100644
> > --- a/drivers/staging/vt6655/device.h
> > +++ b/drivers/staging/vt6655/device.h
> > @@ -246,7 +246,7 @@ struct vnt_private {
> > unsigned char byAutoFBCtrl;
> >
> > /* For Update BaseBand VGA Gain Offset */
> > - bool bUpdateBBVGA;
> > + bool update_bbvga;
> > unsigned int uBBVGADiffCount;
> > unsigned char bbvga_new;
> > unsigned char bbvga_current;
> > diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> > index b08fcf7e6edc..b654fc24d725 100644
> > --- a/drivers/staging/vt6655/device_main.c
> > +++ b/drivers/staging/vt6655/device_main.c
> > @@ -179,7 +179,7 @@ device_set_options(struct vnt_private *priv)
> > priv->byBBType = priv->opts.bbp_type;
> > priv->byPacketType = priv->byBBType;
> > priv->byAutoFBCtrl = AUTO_FB_0;
> > - priv->bUpdateBBVGA = true;
> > + priv->update_bbvga = true;
> > priv->preamble_type = 0;
> >
> > pr_debug(" byShortRetryLimit= %d\n", (int)priv->byShortRetryLimit);
> > @@ -423,7 +423,7 @@ static void device_init_registers(struct vnt_private *priv)
> > /* initialize BBP registers */
> > bb_vt3253_init(priv);
> >
> > - if (priv->bUpdateBBVGA) {
> > + if (priv->update_bbvga) {
> > priv->bbvga_current = priv->bbvga[0];
> > priv->bbvga_new = priv->bbvga_current;
> > bb_set_vga_gain_offset(priv, priv->bbvga[0]);
> > @@ -1040,7 +1040,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
> > long dbm;
> > int i;
> >
> > - if (!priv->bUpdateBBVGA)
> > + if (!priv->update_bbvga)
> > return;
> >
> > if (priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > --
> > 2.34.1
> >
> >
> >

2023-10-17 07:33:51

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 1/4] staging: vt6655: Rename variable bUpdateBBVGA



On Tue, 17 Oct 2023, Gilbert Adikankwu wrote:

> On Tue, Oct 17, 2023 at 06:48:00AM +0200, Julia Lawall wrote:
> >
> >
> > On Mon, 16 Oct 2023, Gilbert Adikankwu wrote:
> >
> > > Remove bool Type encoding "b" from variable name and replace camelcase
> > > with snakecase.
> > >
> > > Mute checkpatch.pl error:
> > >
> > > CHECK: Avoid CamelCase: <bUpdateBBVGA>
> > >
> > > Signed-off-by: Gilbert Adikankwu <[email protected]>
> > > ---
> > > drivers/staging/vt6655/baseband.c | 2 +-
> > > drivers/staging/vt6655/channel.c | 2 +-
> > > drivers/staging/vt6655/device.h | 2 +-
> > > drivers/staging/vt6655/device_main.c | 6 +++---
> > > 4 files changed, 6 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> > > index 7d47b266b87e..f7824396c5ff 100644
> > > --- a/drivers/staging/vt6655/baseband.c
> > > +++ b/drivers/staging/vt6655/baseband.c
> > > @@ -2087,7 +2087,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
> > > /* {{ RobertYu: 20050104 */
> > > } else {
> > > /* No VGA Table now */
> > > - priv->bUpdateBBVGA = false;
> > > + priv->update_bbvga = false;
> > > priv->bbvga[0] = 0x1C;
> >
> > I wonder about the name bbvga in the line above. Does the initial b mean
> > byte or is it a lowercase version of BBVGA?
> >
> > julia
>
> Hello,
>
> bbvga is lowercase version of BBGVA. It was added with this commit 11b896e65f4bff7e412b3abca366ea0bdadc8834

OK thanks for the confirmation.

julia

>
> Thanks
> Gilbert
> >
> > > }
> > >
> > > diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
> > > index 6ac7d470c041..c11bc2dbc356 100644
> > > --- a/drivers/staging/vt6655/channel.c
> > > +++ b/drivers/staging/vt6655/channel.c
> > > @@ -86,7 +86,7 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
> > > return ret;
> > >
> > > /* Set VGA to max sensitivity */
> > > - if (priv->bUpdateBBVGA &&
> > > + if (priv->update_bbvga &&
> > > priv->bbvga_current != priv->bbvga[0]) {
> > > priv->bbvga_current = priv->bbvga[0];
> > >
> > > diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> > > index 68bfadacfa7c..b166d296b82d 100644
> > > --- a/drivers/staging/vt6655/device.h
> > > +++ b/drivers/staging/vt6655/device.h
> > > @@ -246,7 +246,7 @@ struct vnt_private {
> > > unsigned char byAutoFBCtrl;
> > >
> > > /* For Update BaseBand VGA Gain Offset */
> > > - bool bUpdateBBVGA;
> > > + bool update_bbvga;
> > > unsigned int uBBVGADiffCount;
> > > unsigned char bbvga_new;
> > > unsigned char bbvga_current;
> > > diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> > > index b08fcf7e6edc..b654fc24d725 100644
> > > --- a/drivers/staging/vt6655/device_main.c
> > > +++ b/drivers/staging/vt6655/device_main.c
> > > @@ -179,7 +179,7 @@ device_set_options(struct vnt_private *priv)
> > > priv->byBBType = priv->opts.bbp_type;
> > > priv->byPacketType = priv->byBBType;
> > > priv->byAutoFBCtrl = AUTO_FB_0;
> > > - priv->bUpdateBBVGA = true;
> > > + priv->update_bbvga = true;
> > > priv->preamble_type = 0;
> > >
> > > pr_debug(" byShortRetryLimit= %d\n", (int)priv->byShortRetryLimit);
> > > @@ -423,7 +423,7 @@ static void device_init_registers(struct vnt_private *priv)
> > > /* initialize BBP registers */
> > > bb_vt3253_init(priv);
> > >
> > > - if (priv->bUpdateBBVGA) {
> > > + if (priv->update_bbvga) {
> > > priv->bbvga_current = priv->bbvga[0];
> > > priv->bbvga_new = priv->bbvga_current;
> > > bb_set_vga_gain_offset(priv, priv->bbvga[0]);
> > > @@ -1040,7 +1040,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
> > > long dbm;
> > > int i;
> > >
> > > - if (!priv->bUpdateBBVGA)
> > > + if (!priv->update_bbvga)
> > > return;
> > >
> > > if (priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > --
> > > 2.34.1
> > >
> > >
> > >
>
>

2023-10-17 09:08:03

by Karolina Stolarek

[permalink] [raw]
Subject: Re: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

On 17.10.2023 09:19, Gilbert Adikankwu wrote:
> On Tue, Oct 17, 2023 at 08:19:49AM +0200, Philipp Hortmann wrote:
>> On 10/17/23 00:58, Gilbert Adikankwu wrote:
>>> Make the variable names adhere to Linux kernel coding style and mute
>>> checkpatch.pl errors.

A small nit from my side -- "mute" suggests that you suppressed the
warning/error, but your changes fix them, so why now say "fix
checkpatch.pl errors"?

>>>
>>> Gilbert Adikankwu (4):
>>> staging: vt6655: Rename variable bUpdateBBVGA
>>> staging: vt6655: Rename variable byCurrentCh
>>> staging: vt6655: Rename variable byCurPwr
>>> staging: vt6655: Rename variable byBBPreEDRSSI
>>>
>>> drivers/staging/vt6655/baseband.c | 2 +-
>>> drivers/staging/vt6655/channel.c | 18 +++++++++---------
>>> drivers/staging/vt6655/device.h | 8 ++++----
>>> drivers/staging/vt6655/device_main.c | 8 ++++----
>>> drivers/staging/vt6655/dpc.c | 2 +-
>>> drivers/staging/vt6655/rf.c | 4 ++--
>>> 6 files changed, 21 insertions(+), 21 deletions(-)
>>>
>>
>> Hi,
>>
>> - if (priv->byCurrentCh == ch->hw_value)
>> + if (priv->current_ch == ch->hw_value)^M
>> return ret;
>>
>> ERROR: DOS line endings
>>
>> What does the "^M" at the end of the new line?
>> Did you run checkpatch on your patches?
>>
>> Thanks
>>
>> Bye
>>
>> Philipp
>
> Hello,
>
> I do not know what this error means. If anything, I'm surprised there is
> an error. checkpatch is hooked to my git commit and all the patches
> built cleanly on my machine. I will resend now.

I'm not seeing that error when the patch is applied. You could
double-check the patch files before sending by calling checkpatch.pl on
them directly.

This could be also because of how some email clients change the endings
on download, like Thunderbird, and the patch itself might be fine.

All the best,
Karolina

>
> Thanks
> Gilbert
>

2023-10-17 13:40:19

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

On Tue, Oct 17, 2023 at 08:19:49AM +0200, Philipp Hortmann wrote:
> On 10/17/23 00:58, Gilbert Adikankwu wrote:
> > Make the variable names adhere to Linux kernel coding style and mute
> > checkpatch.pl errors.
> >
> > Gilbert Adikankwu (4):
> > staging: vt6655: Rename variable bUpdateBBVGA
> > staging: vt6655: Rename variable byCurrentCh
> > staging: vt6655: Rename variable byCurPwr
> > staging: vt6655: Rename variable byBBPreEDRSSI
> >
> > drivers/staging/vt6655/baseband.c | 2 +-
> > drivers/staging/vt6655/channel.c | 18 +++++++++---------
> > drivers/staging/vt6655/device.h | 8 ++++----
> > drivers/staging/vt6655/device_main.c | 8 ++++----
> > drivers/staging/vt6655/dpc.c | 2 +-
> > drivers/staging/vt6655/rf.c | 4 ++--
> > 6 files changed, 21 insertions(+), 21 deletions(-)
> >
>
> Hi,
>
> - if (priv->byCurrentCh == ch->hw_value)
> + if (priv->current_ch == ch->hw_value)^M
> return ret;
>
> ERROR: DOS line endings
>
> What does the "^M" at the end of the new line?
> Did you run checkpatch on your patches?

I don't see that on my side, are you sure this is there?

thanks,

greg k-h

2023-10-17 18:02:30

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH 0/4] Rename variable bUpdateBBVGA, byCurrentCh, byCurPwr and byBBPreEDRSSI

On 10/17/23 15:40, Greg KH wrote:
> On Tue, Oct 17, 2023 at 08:19:49AM +0200, Philipp Hortmann wrote:
>> On 10/17/23 00:58, Gilbert Adikankwu wrote:
>>> Make the variable names adhere to Linux kernel coding style and mute
>>> checkpatch.pl errors.
>>>
>>> Gilbert Adikankwu (4):
>>> staging: vt6655: Rename variable bUpdateBBVGA
>>> staging: vt6655: Rename variable byCurrentCh
>>> staging: vt6655: Rename variable byCurPwr
>>> staging: vt6655: Rename variable byBBPreEDRSSI
>>>
>>> drivers/staging/vt6655/baseband.c | 2 +-
>>> drivers/staging/vt6655/channel.c | 18 +++++++++---------
>>> drivers/staging/vt6655/device.h | 8 ++++----
>>> drivers/staging/vt6655/device_main.c | 8 ++++----
>>> drivers/staging/vt6655/dpc.c | 2 +-
>>> drivers/staging/vt6655/rf.c | 4 ++--
>>> 6 files changed, 21 insertions(+), 21 deletions(-)
>>>
>>
>> Hi,
>>
>> - if (priv->byCurrentCh == ch->hw_value)
>> + if (priv->current_ch == ch->hw_value)^M
>> return ret;
>>
>> ERROR: DOS line endings
>>
>> What does the "^M" at the end of the new line?
>> Did you run checkpatch on your patches?
>
> I don't see that on my side, are you sure this is there?
>
> thanks,
>
> greg k-h


Hi,

as previously assumed: yes I saved the email from Thunderbird to Downloads:

kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git apply
--reject --ignore-space-change --ignore-whitespace ~/Downloads/\[PATCH\ 1*
Checking patch drivers/staging/vt6655/baseband.c...
Checking patch drivers/staging/vt6655/channel.c...
Checking patch drivers/staging/vt6655/device.h...
Checking patch drivers/staging/vt6655/device_main.c...
Applied patch drivers/staging/vt6655/baseband.c cleanly.
Applied patch drivers/staging/vt6655/channel.c cleanly.
Applied patch drivers/staging/vt6655/device.h cleanly.
Applied patch drivers/staging/vt6655/device_main.c cleanly.
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git diff
diff --git a/drivers/staging/vt6655/baseband.c
b/drivers/staging/vt6655/baseband.c
index 7d47b266b87e..4fe7b6856c29 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2087,7 +2087,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
/* {{ RobertYu: 20050104 */
} else {
/* No VGA Table now */
- priv->bUpdateBBVGA = false;
+ priv->update_bbvga = false;^M
priv->bbvga[0] = 0x1C;
}

diff --git a/drivers/staging/vt6655/channel.c
b/drivers/staging/vt6655/channel.c
index 6ac7d470c041..0e1ca481f976 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -86,7 +86,7 @@ bool set_channel(struct vnt_private *priv, struct
ieee80211_channel *ch)
return ret;

/* Set VGA to max sensitivity */
- if (priv->bUpdateBBVGA &&
+ if (priv->update_bbvga &&^M
priv->bbvga_current != priv->bbvga[0]) {
priv->bbvga_current = priv->bbvga[0];

diff --git a/drivers/staging/vt6655/device.h
b/drivers/staging/vt6655/device.h
index 68bfadacfa7c..7b8fb2aad08a 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -246,7 +246,7 @@ struct vnt_private {
unsigned char byAutoFBCtrl;

/* For Update BaseBand VGA Gain Offset */
- bool bUpdateBBVGA;
+ bool update_bbvga;^M
unsigned int uBBVGADiffCount;
unsigned char bbvga_new;
unsigned char bbvga_current;
diff --git a/drivers/staging/vt6655/device_main.c
b/drivers/staging/vt6655/device_main.c
index b08fcf7e6edc..dd6ac8a3cc29 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -179,7 +179,7 @@ device_set_options(struct vnt_private *priv)
priv->byBBType = priv->opts.bbp_type;
priv->byPacketType = priv->byBBType;
priv->byAutoFBCtrl = AUTO_FB_0;
- priv->bUpdateBBVGA = true;
+ priv->update_bbvga = true;^M
priv->preamble_type = 0;

pr_debug(" byShortRetryLimit= %d\n", (int)priv->byShortRetryLimit);
@@ -423,7 +423,7 @@ static void device_init_registers(struct vnt_private
*priv)
/* initialize BBP registers */
bb_vt3253_init(priv);

- if (priv->bUpdateBBVGA) {
+ if (priv->update_bbvga) {^M
priv->bbvga_current = priv->bbvga[0];
priv->bbvga_new = priv->bbvga_current;
bb_set_vga_gain_offset(priv, priv->bbvga[0]);
@@ -1040,7 +1040,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
long dbm;
int i;

- if (!priv->bUpdateBBVGA)
+ if (!priv->update_bbvga)^M
return;

if (priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git add .
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git commit
-m "test"
WARNING: Missing commit description - Add an appropriate one

ERROR: DOS line endings
#16: FILE: drivers/staging/vt6655/baseband.c:2090:
+^I^Ipriv->update_bbvga = false;^M$

ERROR: DOS line endings
#29: FILE: drivers/staging/vt6655/channel.c:89:
+^Iif (priv->update_bbvga &&^M$

ERROR: DOS line endings
#42: FILE: drivers/staging/vt6655/device.h:249:
+^Ibool update_bbvga;^M$

ERROR: DOS line endings
#55: FILE: drivers/staging/vt6655/device_main.c:182:
+^Ipriv->update_bbvga = true;^M$

ERROR: DOS line endings
#64: FILE: drivers/staging/vt6655/device_main.c:426:
+^Iif (priv->update_bbvga) {^M$

ERROR: DOS line endings
#73: FILE: drivers/staging/vt6655/device_main.c:1043:
+^Iif (!priv->update_bbvga)^M$

ERROR: Missing Signed-off-by: line(s)

total: 7 errors, 1 warnings, 0 checks, 48 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.

"[PATCH] test" has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[staging-testing 0e62bfff3764] test
4 files changed, 6 insertions(+), 6 deletions(-)
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Other patch:
Same issue

kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git diff
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c
b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index ec8edfecdb73..47c01979e91f 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -43,11 +43,11 @@ static u8 tx_ts_delete_ba(struct rtllib_device
*ieee, struct tx_ts_record *pTxTs

static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct
rx_ts_record *ts)
{
- struct ba_record *pBa = &ts->rx_admitted_ba_record;
+ struct ba_record *ba = &ts->rx_admitted_ba_record;^M
u8 bSendDELBA = false;

- if (pBa->b_valid) {
- deactivate_ba_entry(ieee, pBa);
+ if (ba->b_valid) {^M
+ deactivate_ba_entry(ieee, ba);^M
bSendDELBA = true;
}


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
downloaded from
https://lore.kernel.org/linux-staging/[email protected]/T/#m1d8abbe97ebcba7afc5def6b318e608be22cb0d8
On right clik on Link "raw" -> "save link as..."

kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git apply
--reject --ignore-space-change --ignore-whitespace
~/Downloads/PATCH-2-4-staging-vt6655-Rename-variable-byCurrentCh.txt
Checking patch drivers/staging/vt6655/channel.c...
Checking patch drivers/staging/vt6655/device.h...
Applied patch drivers/staging/vt6655/channel.c cleanly.
Applied patch drivers/staging/vt6655/device.h cleanly.
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git diff
diff --git a/drivers/staging/vt6655/channel.c
b/drivers/staging/vt6655/channel.c
index e90e0b43505d..13bc35bd2054 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -82,7 +82,7 @@ bool set_channel(struct vnt_private *priv, struct
ieee80211_channel *ch)
{
bool ret = true;

- if (priv->byCurrentCh == ch->hw_value)
+ if (priv->current_ch == ch->hw_value)
return ret;

/* Set VGA to max sensitivity */
@@ -100,7 +100,7 @@ bool set_channel(struct vnt_private *priv, struct
ieee80211_channel *ch)
* it is for better TX throughput
*/

- priv->byCurrentCh = ch->hw_value;
+ priv->current_ch = ch->hw_value;
ret &= RFbSelectChannel(priv, priv->rf_type,
ch->hw_value);

@@ -117,9 +117,9 @@ bool set_channel(struct vnt_private *priv, struct
ieee80211_channel *ch)

/* set HW default power register */
VT6655_MAC_SELECT_PAGE1(priv->port_offset);
- RFbSetPower(priv, RATE_1M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_1M, priv->current_ch);
iowrite8(priv->byCurPwr, priv->port_offset +
MAC_REG_PWRCCK);
- RFbSetPower(priv, RATE_6M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_6M, priv->current_ch);
iowrite8(priv->byCurPwr, priv->port_offset +
MAC_REG_PWROFDM);
VT6655_MAC_SELECT_PAGE0(priv->port_offset);

@@ -127,9 +127,9 @@ bool set_channel(struct vnt_private *priv, struct
ieee80211_channel *ch)
}

if (priv->byBBType == BB_TYPE_11B)
- RFbSetPower(priv, RATE_1M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_1M, priv->current_ch);
else
- RFbSetPower(priv, RATE_6M, priv->byCurrentCh);
+ RFbSetPower(priv, RATE_6M, priv->current_ch);

return ret;
}
diff --git a/drivers/staging/vt6655/device.h
b/drivers/staging/vt6655/device.h
index 8c90539cc3d7..45fae21139af 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -239,7 +239,7 @@ struct vnt_private {
bool bIsBeaconBufReadySet;
unsigned int cbBeaconBufReadySetCnt;
bool bFixRate;
- u16 byCurrentCh;
+ u16 current_ch;

bool bAES;

kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$



Sorry for the mess.

Bye Philipp