All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/wan/z85230.c:758 z8530_interrupt() error: uninitialized symbol 'intr'.
@ 2021-01-14  4:26 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-01-14  4:26 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 7145 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook@chromium.org>
CC: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 3f649ab728cda8038259d8f14492fe400fbab911 treewide: Remove uninitialized_var() usage
date:   6 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20210114 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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/wan/z85230.c:758 z8530_interrupt() error: uninitialized symbol 'intr'.

vim +/intr +758 drivers/net/wan/z85230.c

^1da177e4c3f4152 Linus Torvalds 2005-04-16  685  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  686  /**
^1da177e4c3f4152 Linus Torvalds 2005-04-16  687   *	z8530_interrupt - Handle an interrupt from a Z8530
^1da177e4c3f4152 Linus Torvalds 2005-04-16  688   *	@irq: 	Interrupt number
^1da177e4c3f4152 Linus Torvalds 2005-04-16  689   *	@dev_id: The Z8530 device that is interrupting.
^1da177e4c3f4152 Linus Torvalds 2005-04-16  690   *
^1da177e4c3f4152 Linus Torvalds 2005-04-16  691   *	A Z85[2]30 device has stuck its hand in the air for attention.
^1da177e4c3f4152 Linus Torvalds 2005-04-16  692   *	We scan both the channels on the chip for events and then call
^1da177e4c3f4152 Linus Torvalds 2005-04-16  693   *	the channel specific call backs for each channel that has events.
^1da177e4c3f4152 Linus Torvalds 2005-04-16  694   *	We have to use callback functions because the two channels can be
^1da177e4c3f4152 Linus Torvalds 2005-04-16  695   *	in different modes.
^1da177e4c3f4152 Linus Torvalds 2005-04-16  696   *
^1da177e4c3f4152 Linus Torvalds 2005-04-16  697   *	Locking is done for the handlers. Note that locking is done
^1da177e4c3f4152 Linus Torvalds 2005-04-16  698   *	at the chip level (the 5uS delay issue is per chip not per
^1da177e4c3f4152 Linus Torvalds 2005-04-16  699   *	channel). c->lock for both channels points to dev->lock
^1da177e4c3f4152 Linus Torvalds 2005-04-16  700   */
^1da177e4c3f4152 Linus Torvalds 2005-04-16  701  
7d12e780e003f934 David Howells  2006-10-05  702  irqreturn_t z8530_interrupt(int irq, void *dev_id)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  703  {
^1da177e4c3f4152 Linus Torvalds 2005-04-16  704  	struct z8530_dev *dev=dev_id;
3f649ab728cda803 Kees Cook      2020-06-03  705  	u8 intr;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  706  	static volatile int locker=0;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  707  	int work=0;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  708  	struct z8530_irqhandler *irqs;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  709  	
^1da177e4c3f4152 Linus Torvalds 2005-04-16  710  	if(locker)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  711  	{
23efcb738ea51bef Joe Perches    2011-06-26  712  		pr_err("IRQ re-enter\n");
^1da177e4c3f4152 Linus Torvalds 2005-04-16  713  		return IRQ_NONE;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  714  	}
^1da177e4c3f4152 Linus Torvalds 2005-04-16  715  	locker=1;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  716  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  717  	spin_lock(&dev->lock);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  718  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  719  	while(++work<5000)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  720  	{
^1da177e4c3f4152 Linus Torvalds 2005-04-16  721  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  722  		intr = read_zsreg(&dev->chanA, R3);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  723  		if(!(intr & (CHARxIP|CHATxIP|CHAEXT|CHBRxIP|CHBTxIP|CHBEXT)))
^1da177e4c3f4152 Linus Torvalds 2005-04-16  724  			break;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  725  	
^1da177e4c3f4152 Linus Torvalds 2005-04-16  726  		/* This holds the IRQ status. On the 8530 you must read it from chan 
^1da177e4c3f4152 Linus Torvalds 2005-04-16  727  		   A even though it applies to the whole chip */
^1da177e4c3f4152 Linus Torvalds 2005-04-16  728  		
^1da177e4c3f4152 Linus Torvalds 2005-04-16  729  		/* Now walk the chip and see what it is wanting - it may be
^1da177e4c3f4152 Linus Torvalds 2005-04-16  730  		   an IRQ for someone else remember */
^1da177e4c3f4152 Linus Torvalds 2005-04-16  731  		   
^1da177e4c3f4152 Linus Torvalds 2005-04-16  732  		irqs=dev->chanA.irqs;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  733  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  734  		if(intr & (CHARxIP|CHATxIP|CHAEXT))
^1da177e4c3f4152 Linus Torvalds 2005-04-16  735  		{
^1da177e4c3f4152 Linus Torvalds 2005-04-16  736  			if(intr&CHARxIP)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  737  				irqs->rx(&dev->chanA);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  738  			if(intr&CHATxIP)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  739  				irqs->tx(&dev->chanA);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  740  			if(intr&CHAEXT)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  741  				irqs->status(&dev->chanA);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  742  		}
^1da177e4c3f4152 Linus Torvalds 2005-04-16  743  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  744  		irqs=dev->chanB.irqs;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  745  
^1da177e4c3f4152 Linus Torvalds 2005-04-16  746  		if(intr & (CHBRxIP|CHBTxIP|CHBEXT))
^1da177e4c3f4152 Linus Torvalds 2005-04-16  747  		{
^1da177e4c3f4152 Linus Torvalds 2005-04-16  748  			if(intr&CHBRxIP)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  749  				irqs->rx(&dev->chanB);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  750  			if(intr&CHBTxIP)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  751  				irqs->tx(&dev->chanB);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  752  			if(intr&CHBEXT)
^1da177e4c3f4152 Linus Torvalds 2005-04-16  753  				irqs->status(&dev->chanB);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  754  		}
^1da177e4c3f4152 Linus Torvalds 2005-04-16  755  	}
^1da177e4c3f4152 Linus Torvalds 2005-04-16  756  	spin_unlock(&dev->lock);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  757  	if(work==5000)
23efcb738ea51bef Joe Perches    2011-06-26 @758  		pr_err("%s: interrupt jammed - abort(0x%X)!\n",
23efcb738ea51bef Joe Perches    2011-06-26  759  		       dev->name, intr);
^1da177e4c3f4152 Linus Torvalds 2005-04-16  760  	/* Ok all done */
^1da177e4c3f4152 Linus Torvalds 2005-04-16  761  	locker=0;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  762  	return IRQ_HANDLED;
^1da177e4c3f4152 Linus Torvalds 2005-04-16  763  }
^1da177e4c3f4152 Linus Torvalds 2005-04-16  764  

:::::: The code at line 758 was first introduced by commit
:::::: 23efcb738ea51befe0674e0685fc6cfe353aa553 wan: Update to current logging forms

:::::: TO: Joe Perches <joe@perches.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: 32507 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/net/wan/z85230.c:758 z8530_interrupt() error: uninitialized symbol 'intr'.
@ 2020-11-24 10:55 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-11-24 10:55 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 7066 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook@chromium.org>
CC: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d5beb3140f91b1c8a3d41b14d729aefa4dcc58bc
commit: 3f649ab728cda8038259d8f14492fe400fbab911 treewide: Remove uninitialized_var() usage
date:   4 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 4 months ago
config: i386-randconfig-m021-20201124 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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/wan/z85230.c:758 z8530_interrupt() error: uninitialized symbol 'intr'.

vim +/intr +758 drivers/net/wan/z85230.c

^1da177e4c3f415 Linus Torvalds 2005-04-16  685  
^1da177e4c3f415 Linus Torvalds 2005-04-16  686  /**
^1da177e4c3f415 Linus Torvalds 2005-04-16  687   *	z8530_interrupt - Handle an interrupt from a Z8530
^1da177e4c3f415 Linus Torvalds 2005-04-16  688   *	@irq: 	Interrupt number
^1da177e4c3f415 Linus Torvalds 2005-04-16  689   *	@dev_id: The Z8530 device that is interrupting.
^1da177e4c3f415 Linus Torvalds 2005-04-16  690   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  691   *	A Z85[2]30 device has stuck its hand in the air for attention.
^1da177e4c3f415 Linus Torvalds 2005-04-16  692   *	We scan both the channels on the chip for events and then call
^1da177e4c3f415 Linus Torvalds 2005-04-16  693   *	the channel specific call backs for each channel that has events.
^1da177e4c3f415 Linus Torvalds 2005-04-16  694   *	We have to use callback functions because the two channels can be
^1da177e4c3f415 Linus Torvalds 2005-04-16  695   *	in different modes.
^1da177e4c3f415 Linus Torvalds 2005-04-16  696   *
^1da177e4c3f415 Linus Torvalds 2005-04-16  697   *	Locking is done for the handlers. Note that locking is done
^1da177e4c3f415 Linus Torvalds 2005-04-16  698   *	at the chip level (the 5uS delay issue is per chip not per
^1da177e4c3f415 Linus Torvalds 2005-04-16  699   *	channel). c->lock for both channels points to dev->lock
^1da177e4c3f415 Linus Torvalds 2005-04-16  700   */
^1da177e4c3f415 Linus Torvalds 2005-04-16  701  
7d12e780e003f93 David Howells  2006-10-05  702  irqreturn_t z8530_interrupt(int irq, void *dev_id)
^1da177e4c3f415 Linus Torvalds 2005-04-16  703  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  704  	struct z8530_dev *dev=dev_id;
3f649ab728cda80 Kees Cook      2020-06-03  705  	u8 intr;
^1da177e4c3f415 Linus Torvalds 2005-04-16  706  	static volatile int locker=0;
^1da177e4c3f415 Linus Torvalds 2005-04-16  707  	int work=0;
^1da177e4c3f415 Linus Torvalds 2005-04-16  708  	struct z8530_irqhandler *irqs;
^1da177e4c3f415 Linus Torvalds 2005-04-16  709  	
^1da177e4c3f415 Linus Torvalds 2005-04-16  710  	if(locker)
^1da177e4c3f415 Linus Torvalds 2005-04-16  711  	{
23efcb738ea51be Joe Perches    2011-06-26  712  		pr_err("IRQ re-enter\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16  713  		return IRQ_NONE;
^1da177e4c3f415 Linus Torvalds 2005-04-16  714  	}
^1da177e4c3f415 Linus Torvalds 2005-04-16  715  	locker=1;
^1da177e4c3f415 Linus Torvalds 2005-04-16  716  
^1da177e4c3f415 Linus Torvalds 2005-04-16  717  	spin_lock(&dev->lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16  718  
^1da177e4c3f415 Linus Torvalds 2005-04-16  719  	while(++work<5000)
^1da177e4c3f415 Linus Torvalds 2005-04-16  720  	{
^1da177e4c3f415 Linus Torvalds 2005-04-16  721  
^1da177e4c3f415 Linus Torvalds 2005-04-16  722  		intr = read_zsreg(&dev->chanA, R3);
^1da177e4c3f415 Linus Torvalds 2005-04-16  723  		if(!(intr & (CHARxIP|CHATxIP|CHAEXT|CHBRxIP|CHBTxIP|CHBEXT)))
^1da177e4c3f415 Linus Torvalds 2005-04-16  724  			break;
^1da177e4c3f415 Linus Torvalds 2005-04-16  725  	
^1da177e4c3f415 Linus Torvalds 2005-04-16  726  		/* This holds the IRQ status. On the 8530 you must read it from chan 
^1da177e4c3f415 Linus Torvalds 2005-04-16  727  		   A even though it applies to the whole chip */
^1da177e4c3f415 Linus Torvalds 2005-04-16  728  		
^1da177e4c3f415 Linus Torvalds 2005-04-16  729  		/* Now walk the chip and see what it is wanting - it may be
^1da177e4c3f415 Linus Torvalds 2005-04-16  730  		   an IRQ for someone else remember */
^1da177e4c3f415 Linus Torvalds 2005-04-16  731  		   
^1da177e4c3f415 Linus Torvalds 2005-04-16  732  		irqs=dev->chanA.irqs;
^1da177e4c3f415 Linus Torvalds 2005-04-16  733  
^1da177e4c3f415 Linus Torvalds 2005-04-16  734  		if(intr & (CHARxIP|CHATxIP|CHAEXT))
^1da177e4c3f415 Linus Torvalds 2005-04-16  735  		{
^1da177e4c3f415 Linus Torvalds 2005-04-16  736  			if(intr&CHARxIP)
^1da177e4c3f415 Linus Torvalds 2005-04-16  737  				irqs->rx(&dev->chanA);
^1da177e4c3f415 Linus Torvalds 2005-04-16  738  			if(intr&CHATxIP)
^1da177e4c3f415 Linus Torvalds 2005-04-16  739  				irqs->tx(&dev->chanA);
^1da177e4c3f415 Linus Torvalds 2005-04-16  740  			if(intr&CHAEXT)
^1da177e4c3f415 Linus Torvalds 2005-04-16  741  				irqs->status(&dev->chanA);
^1da177e4c3f415 Linus Torvalds 2005-04-16  742  		}
^1da177e4c3f415 Linus Torvalds 2005-04-16  743  
^1da177e4c3f415 Linus Torvalds 2005-04-16  744  		irqs=dev->chanB.irqs;
^1da177e4c3f415 Linus Torvalds 2005-04-16  745  
^1da177e4c3f415 Linus Torvalds 2005-04-16  746  		if(intr & (CHBRxIP|CHBTxIP|CHBEXT))
^1da177e4c3f415 Linus Torvalds 2005-04-16  747  		{
^1da177e4c3f415 Linus Torvalds 2005-04-16  748  			if(intr&CHBRxIP)
^1da177e4c3f415 Linus Torvalds 2005-04-16  749  				irqs->rx(&dev->chanB);
^1da177e4c3f415 Linus Torvalds 2005-04-16  750  			if(intr&CHBTxIP)
^1da177e4c3f415 Linus Torvalds 2005-04-16  751  				irqs->tx(&dev->chanB);
^1da177e4c3f415 Linus Torvalds 2005-04-16  752  			if(intr&CHBEXT)
^1da177e4c3f415 Linus Torvalds 2005-04-16  753  				irqs->status(&dev->chanB);
^1da177e4c3f415 Linus Torvalds 2005-04-16  754  		}
^1da177e4c3f415 Linus Torvalds 2005-04-16  755  	}
^1da177e4c3f415 Linus Torvalds 2005-04-16  756  	spin_unlock(&dev->lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16  757  	if(work==5000)
23efcb738ea51be Joe Perches    2011-06-26 @758  		pr_err("%s: interrupt jammed - abort(0x%X)!\n",
23efcb738ea51be Joe Perches    2011-06-26  759  		       dev->name, intr);
^1da177e4c3f415 Linus Torvalds 2005-04-16  760  	/* Ok all done */
^1da177e4c3f415 Linus Torvalds 2005-04-16  761  	locker=0;
^1da177e4c3f415 Linus Torvalds 2005-04-16  762  	return IRQ_HANDLED;
^1da177e4c3f415 Linus Torvalds 2005-04-16  763  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  764  

:::::: The code at line 758 was first introduced by commit
:::::: 23efcb738ea51befe0674e0685fc6cfe353aa553 wan: Update to current logging forms

:::::: TO: Joe Perches <joe@perches.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: 37614 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-14  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  4:26 drivers/net/wan/z85230.c:758 z8530_interrupt() error: uninitialized symbol 'intr' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-11-24 10:55 kernel test robot

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.