public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Tree Davies <tdavies@darkphysics.net>
Cc: gregkh@linuxfoundation.org, anjan@momi.ca, error27@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/12] Staging: rtl8192e: Rename variable pBA
Date: Fri, 14 Jul 2023 06:57:07 +0200	[thread overview]
Message-ID: <3b0804ad-bc6c-2f1c-5e67-4505b3da3d40@gmail.com> (raw)
In-Reply-To: <ZLC3w4tjw16LwuEa@basil>

On 7/14/23 04:49, Tree Davies wrote:
> On Thu, Jul 13, 2023 at 11:54:40PM +0200, Philipp Hortmann wrote:
>> On 7/13/23 01:35, Tree Davies wrote:
>>> Rename variable pBA to pba in order to Fix checkpatch
>>> warning: Avoid CamelCase
>>>
>>> Signed-off-by: Tree Davies<tdavies@darkphysics.net>
>>> ---
>>>    drivers/staging/rtl8192e/rtl819x_BAProc.c | 106 +++++++++++-----------
>>>    drivers/staging/rtl8192e/rtllib.h         |   2 +-
>>>    2 files changed, 54 insertions(+), 54 deletions(-)
>>
>>
>> Hi Tree,
>> the p is typically for pointer. This is not wanted when you change the name.
>> But ba is is in use....
>>
>> Bye Philipp
> 
> Thanks Philipp,
>                                                                       
> A few thoughts...
> Looking at occurances of pBA, they all appear as local variable
> declarations of struct ba_record, mostly as function params.
>                                                                       
> I also see what you mentioned, as BA being already taken in
> rtl819x_BAProc.c:394 and line 292, but I don't 'think' that renaming them
> both to ba will result negatively(?).
> 
> Agreed, let's wait on Greg.
> 
> Cheers!
> Tree
> 

Hi Tree,

it is not so much about the compiler or if it works this way. When I 
read a program I often use Ctrl+Shift+F what shows me all variables in 
one folder (driver). I expect that I then always see one variable for 
one use and do not have to do a one by one decision if this belongs to 
the one content or to the other.

Please consider "readability" is important for kernel code.

Thanks for your support.

Bye Philipp

  reply	other threads:[~2023-07-14  4:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 23:35 [PATCH 09/12] Staging: rtl8192e: Rename variable pBA Tree Davies
2023-07-13 21:54 ` Philipp Hortmann
2023-07-14  2:49   ` Tree Davies
2023-07-14  4:57     ` Philipp Hortmann [this message]
2023-07-14 10:10     ` Dan Carpenter
2023-07-14  9:53 ` Dan Carpenter

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=3b0804ad-bc6c-2f1c-5e67-4505b3da3d40@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=anjan@momi.ca \
    --cc=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=tdavies@darkphysics.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox