[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1Ftx/Q69AHVR4oZ@kroah.com>
Date: Thu, 20 Oct 2022 17:48:23 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Deepak R Varma <drv@...lo.com>
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 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.
thanks,
greg k-h
Powered by blists - more mailing lists