netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Dipendra Khadka <kdipendra88@gmail.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: ethernet: marvell: octeontx2: nic: Add error pointer check in otx2_ethtool.c
Date: Tue, 24 Sep 2024 16:58:12 +0100	[thread overview]
Message-ID: <20240924155812.GR4029621@kernel.org> (raw)
In-Reply-To: <CAEKBCKPw=uwN+MCLenOe6ZkLBYiwSg35eQ_rk_YeNBMOuqvVOw@mail.gmail.com>

On Tue, Sep 24, 2024 at 08:39:47PM +0545, Dipendra Khadka wrote:
> Hi Simon,
> 
> On Tue, 24 Sept 2024 at 12:55, Simon Horman <horms@kernel.org> wrote:
> >
> > On Mon, Sep 23, 2024 at 11:31:34AM +0000, Dipendra Khadka wrote:
> > > Add error pointer check after calling otx2_mbox_get_rsp().
> > >
> >
> > Hi Dipendra,
> >
> > Please add a fixes tag here (no blank line between it and your
> > Signed-off-by line).
> > > Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
> >
> > As you have posted more than one patch for this driver, with very similar,
> > not overly complex or verbose changes, it might make sense to combine them
> > into a single patch. Or, if not, to bundle them up into a patch-set with a
> > cover letter.
> >
> > Regarding the patch subject, looking at git history, I think
> > an appropriate prefix would be 'octeontx2-pf:'. I would go for
> > something like this:
> >
> >   Subject: [PATCH net v2] octeontx2-pf: handle otx2_mbox_get_rsp errors
> >
> 
> If I bundle all the patches for the
> drivers/net/ethernet/marvell/octeontx2/ , will this subject without v2
> work? Or do I need to change anything? I don't know how to send the
> patch-set with the cover letter.

Given that one of the patches is already at v2, probably v3 is best.

If you use b4, it should send a cover letter if the series has more than 1
patch.  You can use various options to b4 prep to set the prefix
(net-next), version, and edit the cover (letter).  And you can use various
options to b4 send, such as -d, to test your submission before sending it
to the netdev ML.

Alternatively the following command will output 3 files: a cover letter and
a file for each of two patches, with v3 and net-next in the subject of each
file. You can edit these files and send them using git send-email.

git format-patch --cover-letter -2 -v3 --subject-prefix="PATCH net-next"

> 
> > As for the code changes themselves, module the nits below, I agree the
> > error handling is consistent with that elsewhere in the same functions, and
> > is correct.
> >
> > > ---
> > >  .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c    | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > >
> > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > > index 0db62eb0dab3..36a08303752f 100644
> > > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > > @@ -343,6 +343,12 @@ static void otx2_get_pauseparam(struct net_device *netdev,
> > >       if (!otx2_sync_mbox_msg(&pfvf->mbox)) {
> > >               rsp = (struct cgx_pause_frm_cfg *)
> > >                      otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
> > > +
> >
> > nit: No blank line here.
> >
> > > +             if (IS_ERR(rsp)) {
> > > +                     mutex_unlock(&pfvf->mbox.lock);
> > > +                     return;
> > > +             }
> > > +
> 
> If the above blank line after the check is ok or do I have to remove
> this as well?

Please leave the blank line after the check (here).

> 
> > >               pause->rx_pause = rsp->rx_pause;
> > >               pause->tx_pause = rsp->tx_pause;
> > >       }

  reply	other threads:[~2024-09-24 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 11:31 [PATCH net] net: ethernet: marvell: octeontx2: nic: Add error pointer check in otx2_ethtool.c Dipendra Khadka
2024-09-24  7:10 ` Simon Horman
2024-09-24 14:54   ` Dipendra Khadka
2024-09-24 15:58     ` Simon Horman [this message]
2024-09-24 17:57       ` Dipendra Khadka
2024-09-24 18:14         ` Simon Horman
2024-09-25  6:22           ` Dipendra Khadka
2024-09-26  5:42             ` Dipendra Khadka
2024-09-30 18:12               ` Dipendra Khadka
2024-10-01 13:42                 ` Simon Horman
2024-10-01 15:11                   ` Dipendra Khadka

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=20240924155812.GR4029621@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kdipendra88@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).