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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1F3MTzzq1axUyec@debian-BULLSEYE-live-builder-AMD64>
Date:   Thu, 20 Oct 2022 21:58:33 +0530
From:   Deepak R Varma <drv@...lo.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     outreachy@...ts.linux.dev, Larry.Finger@...inger.net,
        phil@...lpotter.co.uk, paskripkin@...il.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        kumarpraveen@...ux.microsoft.com, saurabh.truth@...il.com
Subject: Re: [PATCH v3 01/10] staging: r8188eu: use Linux kernel variable
 naming convention

On Thu, Oct 20, 2022 at 05:48:23PM +0200, Greg KH wrote:
> On Thu, Oct 20, 2022 at 01:22:50PM +0530, Deepak R Varma wrote:
> > Follow the Linux Kernel coding style variable naming convention instead
> > of using camelCase style. Issue reported by checkpatch script for
> > these variables:
> >         tagLen, tagType, networkAddr, ipAddr, macAddr
> >
> > Signed-off-by: Deepak R Varma <drv@...lo.com>
> > ---
> >
> > Changes in v3:
> >    -- None
> >
> > Changes in v1 [actually v2]:
> >    1. Improve patch description per feedback from julia.lawall@...ia.fr
> >
> >
> >  drivers/staging/r8188eu/core/rtw_br_ext.c | 112 +++++++++++-----------
> >  1 file changed, 56 insertions(+), 56 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
> > index 4c5f30792a46..79daf8f269d6 100644
> > --- a/drivers/staging/r8188eu/core/rtw_br_ext.c
> > +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
> > @@ -50,17 +50,17 @@
> >  static unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
> >  {
> >  	unsigned char *cur_ptr, *start_ptr;
> > -	unsigned short tagLen, tagType;
> > +	unsigned short tag_len, tag_type;
> >
> >  	start_ptr = (unsigned char *)ph->tag;
> >  	cur_ptr = (unsigned char *)ph->tag;
> >  	while ((cur_ptr - start_ptr) < ntohs(ph->length)) {
> >  		/*  prevent un-alignment access */
> > -		tagType = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]);
> > -		tagLen  = (unsigned short)((cur_ptr[2] << 8) + cur_ptr[3]);
> > -		if (tagType == type)
> > +		tag_type = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]);
> > +		tag_len  = (unsigned short)((cur_ptr[2] << 8) + cur_ptr[3]);
> > +		if (tag_type == type)
> >  			return cur_ptr;
> > -		cur_ptr = cur_ptr + TAG_HDR_LEN + tagLen;
> > +		cur_ptr = cur_ptr + TAG_HDR_LEN + tag_len;
> >  	}
> >  	return NULL;
> >  }
> > @@ -111,32 +111,32 @@ static int  __nat25_has_expired(struct nat25_network_db_entry *fdb)
> >  	return 0;
> >  }
> >
> > -static void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
>
> As others have said, just make "networkAddr" be "addr" and then it will
> be a lot cleaner and smaller overall.

Sounds good. Noted for next revision.

Thank you.
./drv

>
> thanks,
>
> greg k-h


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ