From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/smsc/smc91x.c:550 smc_hardware_send_pkt() error: uninitialized symbol 'flags'.
Date: Thu, 01 Apr 2021 01:50:19 +0800 [thread overview]
Message-ID: <202104010100.JPvwiAAB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 10431 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Andrew Lunn <andrew@lunn.ch>
CC: Jakub Kicinski <kuba@kernel.org>
Hi Andrew,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e46d1b78a03d52306f21f77a4e4a144b6d31486
commit: 7958ba7e6273a02f49432a2506958d0f59b5b8da drivers: net: smsc: Add COMPILE_TEST support
date: 5 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 5 months ago
config: microblaze-randconfig-m031-20210331 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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/smsc/smc91x.c:550 smc_hardware_send_pkt() error: uninitialized symbol 'flags'.
vim +/flags +550 drivers/net/ethernet/smsc/smc91x.c
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 534
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 535 /*
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 536 * This is called to actually send a packet to the chip.
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 537 */
7961fb1089f826 drivers/net/ethernet/smsc/smc91x.c Allen Pais 2020-09-14 538 static void smc_hardware_send_pkt(struct tasklet_struct *t)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 539 {
7961fb1089f826 drivers/net/ethernet/smsc/smc91x.c Allen Pais 2020-09-14 540 struct smc_local *lp = from_tasklet(lp, t, tx_task);
7961fb1089f826 drivers/net/ethernet/smsc/smc91x.c Allen Pais 2020-09-14 541 struct net_device *dev = lp->dev;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 542 void __iomem *ioaddr = lp->base;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 543 struct sk_buff *skb;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 544 unsigned int packet_no, len;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 545 unsigned char *buf;
8ff499e43c5376 drivers/net/smc91x.c Dongdong Deng 2009-08-23 546 unsigned long flags;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 547
6389aa458ed995 drivers/net/ethernet/smsc/smc91x.c Ben Boeckel 2013-11-01 548 DBG(3, dev, "%s\n", __func__);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 549
8ff499e43c5376 drivers/net/smc91x.c Dongdong Deng 2009-08-23 @550 if (!smc_special_trylock(&lp->lock, flags)) {
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 551 netif_stop_queue(dev);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 552 tasklet_schedule(&lp->tx_task);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 553 return;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 554 }
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 555
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 556 skb = lp->pending_tx_skb;
be83668a253149 drivers/net/smc91x.c Nicolas Pitre 2005-06-19 557 if (unlikely(!skb)) {
8ff499e43c5376 drivers/net/smc91x.c Dongdong Deng 2009-08-23 558 smc_special_unlock(&lp->lock, flags);
be83668a253149 drivers/net/smc91x.c Nicolas Pitre 2005-06-19 559 return;
be83668a253149 drivers/net/smc91x.c Nicolas Pitre 2005-06-19 560 }
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 561 lp->pending_tx_skb = NULL;
be83668a253149 drivers/net/smc91x.c Nicolas Pitre 2005-06-19 562
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 563 packet_no = SMC_GET_AR(lp);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 564 if (unlikely(packet_no & AR_FAILED)) {
6389aa458ed995 drivers/net/ethernet/smsc/smc91x.c Ben Boeckel 2013-11-01 565 netdev_err(dev, "Memory allocation failed.\n");
09f75cd7bf1372 drivers/net/smc91x.c Jeff Garzik 2007-10-03 566 dev->stats.tx_errors++;
09f75cd7bf1372 drivers/net/smc91x.c Jeff Garzik 2007-10-03 567 dev->stats.tx_fifo_errors++;
8ff499e43c5376 drivers/net/smc91x.c Dongdong Deng 2009-08-23 568 smc_special_unlock(&lp->lock, flags);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 569 goto done;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 570 }
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 571
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 572 /* point to the beginning of the packet */
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 573 SMC_SET_PN(lp, packet_no);
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 574 SMC_SET_PTR(lp, PTR_AUTOINC);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 575
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 576 buf = skb->data;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 577 len = skb->len;
6389aa458ed995 drivers/net/ethernet/smsc/smc91x.c Ben Boeckel 2013-11-01 578 DBG(2, dev, "TX PNR 0x%x LENGTH 0x%04x (%d) BUF 0x%p\n",
6389aa458ed995 drivers/net/ethernet/smsc/smc91x.c Ben Boeckel 2013-11-01 579 packet_no, len, len, buf);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 580 PRINT_PKT(buf, len);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 581
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 582 /*
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 583 * Send the packet length (+6 for status words, length, and ctl.
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 584 * The card will pad to 64 bytes with zeroes if packet is too small.
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 585 */
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 586 SMC_PUT_PKT_HDR(lp, 0, len + 6);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 587
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 588 /* send the actual data */
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 589 SMC_PUSH_DATA(lp, buf, len & ~1);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 590
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 591 /* Send final ctl word with the last byte if there is one */
d09d747ae4c25a drivers/net/ethernet/smsc/smc91x.c Robert Jarzmik 2016-10-17 592 SMC_outw(lp, ((len & 1) ? (0x2000 | buf[len - 1]) : 0), ioaddr,
d09d747ae4c25a drivers/net/ethernet/smsc/smc91x.c Robert Jarzmik 2016-10-17 593 DATA_REG(lp));
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 594
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 595 /*
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 596 * If THROTTLE_TX_PKTS is set, we stop the queue here. This will
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 597 * have the effect of having at most one packet queued for TX
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 598 * in the chip's memory at all time.
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 599 *
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 600 * If THROTTLE_TX_PKTS is not set then the queue is stopped only
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 601 * when memory allocation (MC_ALLOC) does not succeed right away.
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 602 */
ea9375607f8b31 drivers/net/smc91x.c Nicolas Pitre 2005-04-12 603 if (THROTTLE_TX_PKTS)
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 604 netif_stop_queue(dev);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 605
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 606 /* queue the packet for TX */
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 607 SMC_SET_MMU_CMD(lp, MC_ENQUEUE);
8ff499e43c5376 drivers/net/smc91x.c Dongdong Deng 2009-08-23 608 smc_special_unlock(&lp->lock, flags);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 609
860e9538a9482b drivers/net/ethernet/smsc/smc91x.c Florian Westphal 2016-05-03 610 netif_trans_update(dev);
09f75cd7bf1372 drivers/net/smc91x.c Jeff Garzik 2007-10-03 611 dev->stats.tx_packets++;
09f75cd7bf1372 drivers/net/smc91x.c Jeff Garzik 2007-10-03 612 dev->stats.tx_bytes += len;
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 613
cfdfa86536d2fb drivers/net/smc91x.c Magnus Damm 2008-02-22 614 SMC_ENABLE_INT(lp, IM_TX_INT | IM_TX_EMPTY_INT);
^1da177e4c3f41 drivers/net/smc91x.c Linus Torvalds 2005-04-16 615
:::::: The code at line 550 was first introduced by commit
:::::: 8ff499e43c537648399fca8ba39d24c0768b3fab smc91x: let smc91x work well under netpoll
:::::: TO: Dongdong Deng <dongdong.deng@windriver.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34441 bytes --]
next reply other threads:[~2021-03-31 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 17:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-25 22:05 drivers/net/ethernet/smsc/smc91x.c:550 smc_hardware_send_pkt() error: uninitialized symbol 'flags' kernel test robot
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=202104010100.JPvwiAAB-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.