public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Yogesh Hegde <yogi.kernel@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] staging: rtl8192e: Rename variable SetWirelessMode
Date: Wed, 31 May 2023 21:16:53 +0530	[thread overview]
Message-ID: <20230531154653.GB87044@yogi-Zephyrus> (raw)
In-Reply-To: <2023052837-half-pretended-e024@gregkh>

On Sun, May 28, 2023 at 05:01:45PM +0100, Greg Kroah-Hartman wrote:
> On Sun, May 28, 2023 at 08:21:33PM +0530, Yogesh Hegde wrote:
> > Rename variable SetWirelessMode to set_wireless_mode to avoid
> > CamelCase which is not accepted by checkpatch.
> > 
> > Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
> > ---
> >  drivers/staging/rtl8192e/rtl8192e/rtl_core.c |  2 +-
> >  drivers/staging/rtl8192e/rtllib.h            |  2 +-
> >  drivers/staging/rtl8192e/rtllib_softmac.c    | 12 ++++++------
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> > index 17b70dde7eeb..699c4accf2db 100644
> > --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> > +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> > @@ -716,7 +716,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
> >  	priv->rtllib->check_nic_enough_desc	= _rtl92e_check_nic_enough_desc;
> >  	priv->rtllib->handle_assoc_response	= _rtl92e_handle_assoc_response;
> >  	priv->rtllib->handle_beacon		= _rtl92e_handle_beacon;
> > -	priv->rtllib->SetWirelessMode		= rtl92e_set_wireless_mode;
> > +	priv->rtllib->set_wireless_mode		= rtl92e_set_wireless_mode;
> 
> As this is only set in one place, why is it needed at all?  Why not just
> call the real function instead?
You are right. I don't understand why the code was originally written this way.

> Same for the other patches in this series, why not turn this into a set
> of cleanup patches removing the unnecessary indirection and removing the
> CamelCase variables entirely?
Yes you are right. I will work on transforming this series into a set of 
cleanup patches to eliminate the unnecessary indirection and remove the 
CamelCase variables entirely.

Thanks for your feedback. 

Regards 
Yogesh


  reply	other threads:[~2023-05-31 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-28 14:51 [PATCH 0/4] Trivial code cleanup patches Yogesh Hegde
2023-05-28 14:51 ` [PATCH 1/4] staging: rtl8192e: Rename variable SetWirelessMode Yogesh Hegde
2023-05-28 16:01   ` Greg Kroah-Hartman
2023-05-31 15:46     ` Yogesh Hegde [this message]
2023-05-28 14:51 ` [PATCH 2/4] staging: rtl8192e: Rename variable SetBWModeHandler Yogesh Hegde
2023-05-28 14:52 ` [PATCH 3/4] staging: rtl8192e: Rename variable LeisurePSLeave Yogesh Hegde
2023-05-28 14:52 ` [PATCH 4/4] staging: rtl8192e: Rename variable InitialGainHandler Yogesh Hegde

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=20230531154653.GB87044@yogi-Zephyrus \
    --to=yogi.kernel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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