All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Deepak R Varma <drv@mailo.com>
Cc: outreachy@lists.linux.dev, Larry.Finger@lwfinger.net,
	phil@philpotter.co.uk, paskripkin@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	kumarpraveen@linux.microsoft.com, saurabh.truth@gmail.com
Subject: Re: [PATCH v3 01/10] staging: r8188eu: use Linux kernel variable naming convention
Date: Thu, 20 Oct 2022 17:48:23 +0200	[thread overview]
Message-ID: <Y1Ftx/Q69AHVR4oZ@kroah.com> (raw)
In-Reply-To: <5226d30242be78ab1ee32bfdd87239ca82569642.1666249716.git.drv@mailo.com>

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@mailo.com>
> ---
> 
> Changes in v3:
>    -- None
> 
> Changes in v1 [actually v2]:
>    1. Improve patch description per feedback from julia.lawall@inria.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

  reply	other threads:[~2022-10-20 15:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  7:52 [PATCH v3 00/10] staging: r8188eu: trivial code cleanup patches Deepak R Varma
2022-10-20  7:52 ` [PATCH v3 01/10] staging: r8188eu: use Linux kernel variable naming convention Deepak R Varma
2022-10-20 15:48   ` Greg KH [this message]
2022-10-20 16:28     ` Deepak R Varma
2022-10-20  7:53 ` [PATCH v3 02/10] staging: r8188eu: reformat long computation lines Deepak R Varma
2022-10-20  7:54 ` [PATCH v3 03/10] staging: r8188eu: remove {} for single statement blocks Deepak R Varma
2022-10-20  7:54 ` [PATCH v3 04/10] staging: r8188eu: use htons macro instead of __constant_htons Deepak R Varma
2022-10-20  7:55 ` [PATCH v3 05/10] staging: r8188eu: correct misspelled words in comments Deepak R Varma
2022-10-20  8:22   ` Dan Carpenter
2022-10-20  8:32     ` Deepak R Varma
2022-10-20  9:12     ` Julia Lawall
2022-10-20  9:18       ` Deepak R Varma
2022-10-20  9:24   ` Julia Lawall
2022-10-20  7:56 ` [PATCH v3 06/10] staging: r8188eu: Add space between function & macro parameters Deepak R Varma
2022-10-20  9:17   ` Julia Lawall
2022-10-20 10:02     ` Deepak R Varma
2022-10-20 10:21       ` Julia Lawall
2022-10-20 10:35         ` Deepak R Varma
2022-10-20 20:54     ` Deepak R Varma
2022-10-20  7:57 ` [PATCH v3 07/10] staging: r8188eu: Associate pointer symbol with parameter name Deepak R Varma
2022-10-20  7:58 ` [PATCH v3 08/10] staging: r8188eu: replace leading spaces by tabs Deepak R Varma
2022-10-20  7:59 ` [PATCH v3 09/10] staging: r8188eu: Put '{" on the symbol declaration line Deepak R Varma
2022-10-20  7:59 ` [PATCH v3 10/10] staging: r8188eu: Correct missing or extra space in the statements Deepak R Varma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1Ftx/Q69AHVR4oZ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=drv@mailo.com \
    --cc=kumarpraveen@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=saurabh.truth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.