LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
@ 2021-08-27 7:06 Dan Carpenter
2021-08-27 15:47 ` Vladimir Oltean
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-27 7:06 UTC (permalink / raw)
To: kbuild, Vladimir Oltean; +Cc: lkp, kbuild-all, linux-kernel, Florian Fainelli
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 77dd11439b86e3f7990e4c0c9e0b67dca82750ba
commit: 924ee317f72459a49ac4130272c7d33063e60339 net: mscc: ocelot: refactor ocelot_xtr_irq_handler into ocelot_xtr_poll
config: openrisc-randconfig-m031-20210827 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
vim +/err +554 drivers/net/ethernet/mscc/ocelot_vsc7514.c
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 534 static irqreturn_t ocelot_xtr_irq_handler(int irq, void *arg)
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 535 {
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 536 struct ocelot *ocelot = arg;
924ee317f72459 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 537 int grp = 0, err;
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 538
f833ca293dd121 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 539 while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp)) {
Can this condition be false on the first iteration through the loop?
4e3b0468e6d7f3 drivers/net/ethernet/mscc/ocelot_board.c Antoine Tenart 2019-08-12 540 struct sk_buff *skb;
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 541
924ee317f72459 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 542 err = ocelot_xtr_poll_frame(ocelot, grp, &skb);
924ee317f72459 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 543 if (err)
a94306cea56fe4 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 544 goto out;
a94306cea56fe4 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 545
924ee317f72459 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 546 skb->dev->stats.rx_bytes += skb->len;
924ee317f72459 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 547 skb->dev->stats.rx_packets++;
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 548
b2e118f638fb89 drivers/net/ethernet/mscc/ocelot_board.c Antoine Tenart 2020-05-26 549 if (!skb_defer_rx_timestamp(skb))
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 550 netif_rx(skb);
f833ca293dd121 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 551 }
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 552
a94306cea56fe4 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 553 out:
d7795f8f26d944 drivers/net/ethernet/mscc/ocelot_vsc7514.c Vladimir Oltean 2021-02-14 @554 if (err < 0)
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 555 while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp))
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 556 ocelot_read_rix(ocelot, QS_XTR_RD, grp);
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 557
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 558 return IRQ_HANDLED;
a556c76adc052c drivers/net/ethernet/mscc/ocelot_board.c Alexandre Belloni 2018-05-14 559 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err'.
2021-08-27 7:06 [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err' Dan Carpenter
@ 2021-08-27 15:47 ` Vladimir Oltean
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Oltean @ 2021-08-27 15:47 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kbuild, lkp, kbuild-all, linux-kernel, Florian Fainelli
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;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-27 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 7:06 [kbuild] drivers/net/ethernet/mscc/ocelot_vsc7514.c:554 ocelot_xtr_irq_handler() error: uninitialized symbol 'err' Dan Carpenter
2021-08-27 15:47 ` Vladimir Oltean
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).