All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Cc: manishc@marvell.com, GR-Linux-NIC-Dev@marvell.com,
	gregkh@linuxfoundation.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH 4/4] [Outreachy kernel] staging: qlge: qlge_ethtool.c: remove an unneeded variable
Date: Wed, 11 Mar 2020 13:44:18 +0100	[thread overview]
Message-ID: <20200311134418.468f571a@elisabeth> (raw)
In-Reply-To: <CAJyzNhmYR0e2Z6YMsfcMdt81zDEn+ReapnPs=PpMaxOMVgANxA@mail.gmail.com>

On Wed, 11 Mar 2020 17:50:35 +0530
Payal Kshirsagar <payalskshirsagar1234@gmail.com> wrote:

> On Wed, Mar 11, 2020, 5:38 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> 
> > On Wed, 11 Mar 2020 14:58:15 +0530
> > Payal Kshirsagar <payalskshirsagar1234@gmail.com> wrote:
> >  
> > > Remove unneeded temporary local variable, cleanup suggested by  
> > coccinelle.  
> > >
> > > Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
> > > ---
> > >  drivers/staging/qlge/qlge_ethtool.c | 5 +----
> > >  1 file changed, 1 insertion(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/staging/qlge/qlge_ethtool.c  
> > b/drivers/staging/qlge/qlge_ethtool.c  
> > > index 592ca7edfc44..e15f9723b5c0 100644
> > > --- a/drivers/staging/qlge/qlge_ethtool.c
> > > +++ b/drivers/staging/qlge/qlge_ethtool.c
> > > @@ -692,7 +692,6 @@ static int ql_set_pauseparam(struct net_device  
> > *netdev,  
> > >                            struct ethtool_pauseparam *pause)
> > >  {
> > >       struct ql_adapter *qdev = netdev_priv(netdev);
> > > -     int status = 0;
> > >
> > >       if ((pause->rx_pause) && (pause->tx_pause))
> > >               qdev->link_config |= CFG_PAUSE_STD;
> > > @@ -700,9 +699,7 @@ static int ql_set_pauseparam(struct net_device  
> > *netdev,  
> > >               qdev->link_config &= ~CFG_PAUSE_STD;
> > >       else
> > >               return -EINVAL;
> > > -
> > > -     status = ql_mb_set_port_cfg(qdev);
> > > -     return status;
> > > +     return ql_mb_set_port_cfg(qdev);  
> >
> > Here, you're also removing a newline that is typically inserted before
> > a second return (or the last one in a function) for readability, or
> > whenever there are two logically distinct branches, same in 3/4.
> >  
> 
> Thanks for the suggestion.
> I thought there is no need to keep the newline as is:D

Have a look at some "sane" examples (especially outside of
drivers/staging), maybe that helps getting a picture...

> But I did not understand what do you want me to do, patch is okay or need
> to be resend by adding a newline for readability:)

I would say you need to re-send the series, because 3/4 and 4/4
actually impair readability in their current form.

Note that I gave my Reviewed-by: on another patch of yours, not on
this series.

Another note: from the cover letter, it's apparent that "[Outreachy
kernel]" is part of commit titles. It shouldn't be, that's only a
prefix (git format-patch --subject-prefix) for email.

> 
> payal
> 
> And in 1/4, you might want to add one. In 2/4, there's no need.
> >
> > --
> > Stefano
> >  

One note about quoting: read above. Who wrote what?

I see you're using GMail, which is fine, by all means, but:

- you shouldn't send HTML emails to kernel lists. Especially with
  projects using patchwork
  (example: https://patchwork.ozlabs.org/project/netdev/list/) this
  has a big potential to mess things up

- you should fix your quoting: a sentence I wrote needs a "> >" prefix
  there, otherwise it seems to come from you, and I'll get confused.

That is, I suggest that you set up an email client as also covered by
the tutorial. The GMail web interface is probably not ideal. The
tutorial suggests 'mutt', but it's not mandatory. I'm using claws-mail
to send you this e-mail and for my work in general.

There are other graphical or text-based clients (Evolution, pine,
sylpheed, KMail, many others) that can also be used for this purpose. I
would suggest that you look at screenshots, maybe play with some of
them, find one you're comfortable with, and set it up.

-- 
Stefano



  reply	other threads:[~2020-03-11 12:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  9:28 [PATCH 0/4] [Outreachy kernel] staging: qlge: remove unneeded variables Payal Kshirsagar
2020-03-11  9:28 ` [PATCH 1/4] [Outreachy kernel] staging: qlge: qlge_main.c: remove an unneeded variable Payal Kshirsagar
2020-03-11  9:28 ` [PATCH 2/4] [Outreachy kernel] staging: qlge: qlge_mpi.c: " Payal Kshirsagar
2020-03-11  9:28 ` [PATCH 3/4] [Outreachy kernel] staging: qlge: qlge_dbg.c: " Payal Kshirsagar
2020-03-11  9:28 ` [PATCH 4/4] [Outreachy kernel] staging: qlge: qlge_ethtool.c: " Payal Kshirsagar
2020-03-11 12:08   ` Stefano Brivio
2020-03-11 12:20     ` Payal Kshirsagar
2020-03-11 12:44       ` Stefano Brivio [this message]
2020-03-11 13:46         ` Payal Kshirsagar
2020-03-11 14:31           ` Stefano Brivio
2020-03-11 14:44             ` Payal Kshirsagar
2020-03-11 15:07               ` Julia Lawall
2020-03-11 15:52                 ` Payal Kshirsagar
2020-03-11 16:48                   ` Stefano Brivio
2020-03-11 17:19                   ` Payal Kshirsagar
2020-03-11 20:31                     ` Julia Lawall
2020-03-11 23:12                       ` Stefano Brivio

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=20200311134418.468f571a@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=manishc@marvell.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=payalskshirsagar1234@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.