[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210827154733.ecd4viobsbfe3k7a@skbuf>
Date: Fri, 27 Aug 2021 15:47:34 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: "kbuild@...ts.01.org" <kbuild@...ts.01.org>,
"lkp@...el.com" <lkp@...el.com>,
"kbuild-all@...ts.01.org" <kbuild-all@...ts.01.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554
ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
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;
> }
Powered by blists - more mailing lists