All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: "John B. Wyatt IV" <jbwyatt4@gmail.com>,
	outreachy-kernel@googlegroups.com,
	Tim Collier <osdevtc@gmail.com>,
	Nikola Jelic <nikola.jelic83@gmail.com>,
	Moritz Muehlenhoff <jmm@debian.org>,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [Outreachy kernel] Re: [PATCH v2] staging: wlan-ng: Fix third argument going over 80 characters
Date: Sat, 21 Mar 2020 11:01:21 +0100	[thread overview]
Message-ID: <20200321100121.GA963811@kroah.com> (raw)
In-Reply-To: <20200321104604.4d43bd25@elisabeth>

On Sat, Mar 21, 2020 at 10:46:04AM +0100, Stefano Brivio wrote:
> On Sat, 21 Mar 2020 10:34:02 +0100
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> > On Fri, Mar 20, 2020 at 06:39:05PM -0700, John B. Wyatt IV wrote:
> > > Create a new 'status' variable to store the value of a long argument
> > > that goes over 80 characters. The status variable is also used for
> > > an if check. Replacing that long statement in both places makes the
> > > code much easier to read.
> > > 
> > > Note: the status variable is assigned after a needed byte order
> > > conversion for usbin->rxfrm.desc.status, which uses a reference.
> > > 
> > > Issue reported by checkpatch.
> > > 
> > > Suggested-by: Stefano Brivio <sbrivio@redhat.com>
> > > Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> > > ---
> > > v2: Resubmitting after git rebase and comments from Julia Lawall 
> > > <julia.lawall@inria.fr>
> > > 
> > >  drivers/staging/wlan-ng/hfa384x_usb.c | 9 +++++----
> > >  1 file changed, 5 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> > > index f8485601aead..9016e6b32efc 100644
> > > --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> > > +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> > > @@ -3252,15 +3252,16 @@ static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb)
> > >  	struct hfa384x *hw = wlandev->priv;
> > >  	int hdrlen;
> > >  	struct p80211_rxmeta *rxmeta;
> > > -	u16 data_len;
> > > -	u16 fc;
> > > +	u16 data_len, fc, status;  
> > 
> > No need to change data_len, or fc definitions, just add a new line here
> > instead for status.
> 
> My bad, I suggested that John would change that because to me:
> 
> 	u16 data_len;
> 	u16 fc;
> 	u16 status;
> 
> looks only slightly worse than:
> 
> 	u16 data_len;
> 	u16 fc;
> 
> but still it's horrible. If the idea is to avoid unrelated changes,
> yeah, I get it :)

The idea is to avoid unrelated changes :)


      reply	other threads:[~2020-03-21 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  1:39 [PATCH v2] staging: wlan-ng: Fix third argument going over 80 characters John B. Wyatt IV
2020-03-21  9:34 ` Greg Kroah-Hartman
2020-03-21  9:46   ` [Outreachy kernel] " Stefano Brivio
2020-03-21 10:01     ` Greg Kroah-Hartman [this message]

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=20200321100121.GA963811@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jbwyatt4@gmail.com \
    --cc=jmm@debian.org \
    --cc=julia.lawall@inria.fr \
    --cc=nikola.jelic83@gmail.com \
    --cc=osdevtc@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sbrivio@redhat.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.