lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210030705.ZQl2khER-lkp@intel.com>
Date:   Mon, 3 Oct 2022 07:41:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: drivers/usb/gadget/udc/omap_udc.c:1915:9: warning: variable 'stat'
 set but not used

Hi Arnd,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4fe89d07dcc2804c8b562f6c7896a45643d34b2f
commit: 8c1fb11b8a77dc489a8ef6d96c38c1297b629d06 ARM: s3c: enable s3c24xx multiplatform support
date:   6 months ago
config: arm-buildonly-randconfig-r001-20221003
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8c1fb11b8a77dc489a8ef6d96c38c1297b629d06
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8c1fb11b8a77dc489a8ef6d96c38c1297b629d06
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/usb/gadget/udc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/usb/gadget/udc/omap_udc.c:1915:9: warning: variable 'stat' set but not used [-Wunused-but-set-variable]
                                   int stat;
                                       ^
>> drivers/usb/gadget/udc/omap_udc.c:110:19: warning: unused variable 'driver_desc' [-Wunused-const-variable]
   static const char driver_desc[] = DRIVER_DESC;
                     ^
   2 warnings generated.


vim +/stat +1915 drivers/usb/gadget/udc/omap_udc.c

^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1887  
7d12e780e003f9 drivers/usb/gadget/omap_udc.c David Howells  2006-10-05  1888  static irqreturn_t omap_udc_pio_irq(int irq, void *_dev)
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1889  {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1890  	u16		epn_stat, irq_src;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1891  	irqreturn_t	status = IRQ_NONE;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1892  	struct omap_ep	*ep;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1893  	int		epnum;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1894  	struct omap_udc	*udc = _dev;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1895  	struct omap_req	*req;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1896  	unsigned long	flags;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1897  
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1898  	spin_lock_irqsave(&udc->lock, flags);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1899  	epn_stat = omap_readw(UDC_EPN_STAT);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1900  	irq_src = omap_readw(UDC_IRQ_SRC);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1901  
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1902  	/* handle OUT first, to avoid some wasteful NAKs */
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1903  	if (irq_src & UDC_EPN_RX) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1904  		epnum = (epn_stat >> 8) & 0x0f;
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1905  		omap_writew(UDC_EPN_RX, UDC_IRQ_SRC);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1906  		status = IRQ_HANDLED;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1907  		ep = &udc->ep[epnum];
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1908  		ep->irqs++;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1909  
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1910  		omap_writew(epnum | UDC_EP_SEL, UDC_EP_NUM);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1911  		ep->fnf = 0;
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1912  		if (omap_readw(UDC_STAT_FLG) & UDC_ACK) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1913  			ep->ackwait--;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1914  			if (!list_empty(&ep->queue)) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16 @1915  				int stat;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1916  				req = container_of(ep->queue.next,
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1917  						struct omap_req, queue);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1918  				stat = read_fifo(ep, req);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1919  				if (!ep->double_buf)
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1920  					ep->fnf = 1;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1921  			}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1922  		}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1923  		/* min 6 clock delay before clearing EP_SEL ... */
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1924  		epn_stat = omap_readw(UDC_EPN_STAT);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1925  		epn_stat = omap_readw(UDC_EPN_STAT);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1926  		omap_writew(epnum, UDC_EP_NUM);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1927  
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1928  		/* enabling fifo _after_ clearing ACK, contrary to docs,
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1929  		 * reduces lossage; timer still needed though (sigh).
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1930  		 */
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1931  		if (ep->fnf) {
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1932  			omap_writew(UDC_SET_FIFO_EN, UDC_CTRL);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1933  			ep->ackwait = 1 + ep->double_buf;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1934  		}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1935  		mod_timer(&ep->timer, PIO_OUT_TIMEOUT);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1936  	}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1937  
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1938  	/* then IN transfers */
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1939  	else if (irq_src & UDC_EPN_TX) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1940  		epnum = epn_stat & 0x0f;
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1941  		omap_writew(UDC_EPN_TX, UDC_IRQ_SRC);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1942  		status = IRQ_HANDLED;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1943  		ep = &udc->ep[16 + epnum];
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1944  		ep->irqs++;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1945  
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1946  		omap_writew(epnum | UDC_EP_DIR | UDC_EP_SEL, UDC_EP_NUM);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1947  		if (omap_readw(UDC_STAT_FLG) & UDC_ACK) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1948  			ep->ackwait = 0;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1949  			if (!list_empty(&ep->queue)) {
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1950  				req = container_of(ep->queue.next,
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1951  						struct omap_req, queue);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1952  				(void) write_fifo(ep, req);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1953  			}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1954  		}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1955  		/* min 6 clock delay before clearing EP_SEL ... */
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1956  		epn_stat = omap_readw(UDC_EPN_STAT);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1957  		epn_stat = omap_readw(UDC_EPN_STAT);
f35ae6346850f6 drivers/usb/gadget/omap_udc.c Tony Lindgren  2008-07-03  1958  		omap_writew(epnum | UDC_EP_DIR, UDC_EP_NUM);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1959  		/* then 6 clocks before it'd tx */
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1960  	}
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1961  
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1962  	spin_unlock_irqrestore(&udc->lock, flags);
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1963  	return status;
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1964  }
^1da177e4c3f41 drivers/usb/gadget/omap_udc.c Linus Torvalds 2005-04-16  1965  

:::::: The code at line 1915 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (142678 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ