lkml.org 
[lkml]   [2021]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
Date
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;
> }

\
 
 \ /
  Last update: 2021-08-27 17:49    [W:0.064 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site