netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v6] net: txgbe: Add build support for txgbe
Date: Thu, 16 Jun 2022 13:29:08 -0700	[thread overview]
Message-ID: <20220616132908.789b9be4@kernel.org> (raw)
In-Reply-To: <YquDYCltyKfEjA93@lunn.ch>

On Thu, 16 Jun 2022 21:24:16 +0200 Andrew Lunn wrote:
> > +err_ioremap:
> > +err_alloc_etherdev:
> > +	pci_release_selected_regions(pdev,
> > +				     pci_select_bars(pdev, IORESOURCE_MEM));
> > +err_pci_reg:
> > +err_dma:
> > +	pci_disable_device(pdev);
> > +	return err;
> > +}  
> 
> It is unusual to have a label without any code. I would suggest you
> remove err_ioramp and err_pce_reg.

IMO it's easier to read the code when the label is named after what it
points to, not where it comes from. The were it comes from information
is rather meaningless. One has to always check both source and
destination to check that the code is correct.

If the label is named after what it jumps to it's possible to validate
that the code is jumping to the correct unroll stage without looking at
the actual error path.

  reply	other threads:[~2022-06-16 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  9:53 [PATCH net-next v6] net: txgbe: Add build support for txgbe Jiawen Wu
2022-06-16 19:24 ` Andrew Lunn
2022-06-16 20:29   ` Jakub Kicinski [this message]
     [not found]     ` <005001d8844b$d58f94c0$80aebe40$@trustnetic.com>
2022-06-20 19:05       ` Jakub Kicinski

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=20220616132908.789b9be4@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=jiawenwu@trustnetic.com \
    --cc=netdev@vger.kernel.org \
    /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).