LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "kbuild@lists.01.org" <kbuild@lists.01.org>,
	"lkp@intel.com" <lkp@intel.com>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
Date: Fri, 27 Aug 2021 15:47:34 +0000	[thread overview]
Message-ID: <20210827154733.ecd4viobsbfe3k7a@skbuf> (raw)
In-Reply-To: <202108271503.UUJHV4l5-lkp@intel.com>

On Fri, Aug 27, 2021 at 10:06:42AM +0300, Dan Carpenter wrote:
> static irqreturn_t ocelot_xtr_irq_handler(int irq, void *arg)
> {
> 	struct ocelot *ocelot = arg;
> 	int grp = 0, err;
>
> 	while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp)) {
>
> Can this condition be false on the first iteration through the loop?

Functionally speaking, no, but if it helps anyone to initialize "err"
with 0, I guess we could...
>
> 		struct sk_buff *skb;
>
> 		err = ocelot_xtr_poll_frame(ocelot, grp, &skb);
> 		if (err)
> 			goto out;
>
> 		skb->dev->stats.rx_bytes += skb->len;
> 		skb->dev->stats.rx_packets++;
>
> 		if (!skb_defer_rx_timestamp(skb))
> 			netif_rx(skb);
> 	}
>
> out:
> 	if (err < 0)
> 		while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp))
> 			ocelot_read_rix(ocelot, QS_XTR_RD, grp);
>
> 	return IRQ_HANDLED;
> }

      reply	other threads:[~2021-08-27 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  7:06 Dan Carpenter
2021-08-27 15:47 ` Vladimir Oltean [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=20210827154733.ecd4viobsbfe3k7a@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=dan.carpenter@oracle.com \
    --cc=f.fainelli@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --subject='Re: [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol '\''err'\''.' \
    /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

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).