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

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


             reply	other threads:[~2021-08-27  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  7:06 Dan Carpenter [this message]
2021-08-27 15:47 ` Vladimir Oltean

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=202108271503.UUJHV4l5-lkp@intel.com \
    --to=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 \
    --cc=vladimir.oltean@nxp.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).