2023-08-09 13:43:11

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH v2] staging: vt6655: replace camel case by snake case

Replace array name of camel case by snake case. Issue found
by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
v1 -> v2: 1. array name renamed from byVT3253B0_RFMD to by_vt3253b0_rfmd
2. typo in the subject line "small case" corrected with the
proper word "snake case"

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/baseband.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 0e135af8316b..cc8793256661 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -499,7 +499,7 @@ static const unsigned char by_vt3253_init_tab_rfmd[CB_VT3253_INIT_FOR_RFMD][2] =
};

#define CB_VT3253B0_INIT_FOR_RFMD 256
-static const unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
+static const unsigned char by_vt3253b0_rfmd[CB_VT3253B0_INIT_FOR_RFMD][2] = {
{0x00, 0x31},
{0x01, 0x00},
{0x02, 0x00},
@@ -2005,8 +2005,8 @@ bool bb_vt3253_init(struct vnt_private *priv)
} else {
for (ii = 0; ii < CB_VT3253B0_INIT_FOR_RFMD; ii++)
result &= bb_write_embedded(priv,
- byVT3253B0_RFMD[ii][0],
- byVT3253B0_RFMD[ii][1]);
+ by_vt3253b0_rfmd[ii][0],
+ by_vt3253b0_rfmd[ii][1]);

for (ii = 0; ii < CB_VT3253B0_AGC_FOR_RFMD2959; ii++)
result &= bb_write_embedded(priv,
--
2.34.1



2023-08-11 22:25:59

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH v2] staging: vt6655: replace camel case by snake case

On Wed, Aug 09, 2023 at 06:17:22PM +0530, Pavan Bobba wrote:
> Replace array name of camel case by snake case. Issue found
> by checkpatch
>
> Signed-off-by: Pavan Bobba <[email protected]>
> ---
> v1 -> v2: 1. array name renamed from byVT3253B0_RFMD to by_vt3253b0_rfmd
> 2. typo in the subject line "small case" corrected with the
> proper word "snake case"
>
> Signed-off-by: Pavan Bobba <[email protected]>
> ---
> drivers/staging/vt6655/baseband.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> index 0e135af8316b..cc8793256661 100644
> --- a/drivers/staging/vt6655/baseband.c
> +++ b/drivers/staging/vt6655/baseband.c
> @@ -499,7 +499,7 @@ static const unsigned char by_vt3253_init_tab_rfmd[CB_VT3253_INIT_FOR_RFMD][2] =
> };
>
> #define CB_VT3253B0_INIT_FOR_RFMD 256
> -static const unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
> +static const unsigned char by_vt3253b0_rfmd[CB_VT3253B0_INIT_FOR_RFMD][2] = {

Again, the "by" needs to just be dropped.

thanks,

greg k-h

2023-08-14 14:41:42

by Pavan Bobba

[permalink] [raw]
Subject: Re: [PATCH v2] staging: vt6655: replace camel case by snake case

On Sat, Aug 12, 2023 at 08:41:51PM +0200, Julia Lawall wrote:
>
>
> On Sat, 12 Aug 2023, Pavan Bobba wrote:
>
> > On Fri, Aug 11, 2023 at 11:27:10PM +0200, Greg KH wrote:
> > > On Wed, Aug 09, 2023 at 06:17:22PM +0530, Pavan Bobba wrote:
> > > > Replace array name of camel case by snake case. Issue found
> > > > by checkpatch
> > > >
> > > > Signed-off-by: Pavan Bobba <[email protected]>
> > > > ---
> > > > v1 -> v2: 1. array name renamed from byVT3253B0_RFMD to by_vt3253b0_rfmd
> > > > 2. typo in the subject line "small case" corrected with the
> > > > proper word "snake case"
> > > >
> > > > Signed-off-by: Pavan Bobba <[email protected]>
> > > > ---
> > > > drivers/staging/vt6655/baseband.c | 6 +++---
> > > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> > > > index 0e135af8316b..cc8793256661 100644
> > > > --- a/drivers/staging/vt6655/baseband.c
> > > > +++ b/drivers/staging/vt6655/baseband.c
> > > > @@ -499,7 +499,7 @@ static const unsigned char by_vt3253_init_tab_rfmd[CB_VT3253_INIT_FOR_RFMD][2] =
> > > > };
> > > >
> > > > #define CB_VT3253B0_INIT_FOR_RFMD 256
> > > > -static const unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
> > > > +static const unsigned char by_vt3253b0_rfmd[CB_VT3253B0_INIT_FOR_RFMD][2] = {
> > >
> > > Again, the "by" needs to just be dropped.
> > >
> > > thanks,
> > >
> > > greg k-h
> >
> > hi greg...did'nt get your comment. can you please provide more elaborate
> > info?
>
> Drop the letter "by_" at the beginning of the function name. It is there
> ot indicate the type, which isn't done in the kernel.
>
> julia

this is'nt a function name but an array name. is in't it fine?

2023-08-14 17:18:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] staging: vt6655: replace camel case by snake case

On Mon, Aug 14, 2023 at 06:32:01PM +0530, Pavan Bobba wrote:
> On Sat, Aug 12, 2023 at 08:41:51PM +0200, Julia Lawall wrote:
> >
> >
> > On Sat, 12 Aug 2023, Pavan Bobba wrote:
> >
> > > On Fri, Aug 11, 2023 at 11:27:10PM +0200, Greg KH wrote:
> > > > On Wed, Aug 09, 2023 at 06:17:22PM +0530, Pavan Bobba wrote:
> > > > > Replace array name of camel case by snake case. Issue found
> > > > > by checkpatch
> > > > >
> > > > > Signed-off-by: Pavan Bobba <[email protected]>
> > > > > ---
> > > > > v1 -> v2: 1. array name renamed from byVT3253B0_RFMD to by_vt3253b0_rfmd
> > > > > 2. typo in the subject line "small case" corrected with the
> > > > > proper word "snake case"
> > > > >
> > > > > Signed-off-by: Pavan Bobba <[email protected]>
> > > > > ---
> > > > > drivers/staging/vt6655/baseband.c | 6 +++---
> > > > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
> > > > > index 0e135af8316b..cc8793256661 100644
> > > > > --- a/drivers/staging/vt6655/baseband.c
> > > > > +++ b/drivers/staging/vt6655/baseband.c
> > > > > @@ -499,7 +499,7 @@ static const unsigned char by_vt3253_init_tab_rfmd[CB_VT3253_INIT_FOR_RFMD][2] =
> > > > > };
> > > > >
> > > > > #define CB_VT3253B0_INIT_FOR_RFMD 256
> > > > > -static const unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
> > > > > +static const unsigned char by_vt3253b0_rfmd[CB_VT3253B0_INIT_FOR_RFMD][2] = {
> > > >
> > > > Again, the "by" needs to just be dropped.
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > >
> > > hi greg...did'nt get your comment. can you please provide more elaborate
> > > info?
> >
> > Drop the letter "by_" at the beginning of the function name. It is there
> > ot indicate the type, which isn't done in the kernel.
> >
> > julia
>
> this is'nt a function name but an array name. is in't it fine?
>

Not at all. The issue is the name, why are you just adding a "_" here?
What does "by" mean? (hint, this is a rhetorical question, I know, I
need you to figure it out so you know how to properly rename the
variable here...)

thanks,

greg k-h