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: <202008102223.YGiZDZtB%lkp@intel.com>
Date:   Mon, 10 Aug 2020 22:49:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arun Kumar Neelakantam <aneela@...eaurora.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but
 not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: 89e7eddece6140020749932f9647a6068cc0d56d soc: qcom: aoss: Read back before triggering the IRQ
date:   6 months ago
config: nds32-randconfig-r031-20200810 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
        git checkout 89e7eddece6140020749932f9647a6068cc0d56d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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

All warnings (new ones prefixed by >>):

   drivers/soc/qcom/qcom_aoss.c: In function 'qmp_send':
>> drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but not used [-Wunused-but-set-variable]
     228 |  size_t tlen;
         |         ^~~~

vim +/tlen +228 drivers/soc/qcom/qcom_aoss.c

   212	
   213	/**
   214	 * qmp_send() - send a message to the AOSS
   215	 * @qmp: qmp context
   216	 * @data: message to be sent
   217	 * @len: length of the message
   218	 *
   219	 * Transmit @data to AOSS and wait for the AOSS to acknowledge the message.
   220	 * @len must be a multiple of 4 and not longer than the mailbox size. Access is
   221	 * synchronized by this implementation.
   222	 *
   223	 * Return: 0 on success, negative errno on failure
   224	 */
   225	static int qmp_send(struct qmp *qmp, const void *data, size_t len)
   226	{
   227		long time_left;
 > 228		size_t tlen;
   229		int ret;
   230	
   231		if (WARN_ON(len + sizeof(u32) > qmp->size))
   232			return -EINVAL;
   233	
   234		if (WARN_ON(len % sizeof(u32)))
   235			return -EINVAL;
   236	
   237		mutex_lock(&qmp->tx_lock);
   238	
   239		/* The message RAM only implements 32-bit accesses */
   240		__iowrite32_copy(qmp->msgram + qmp->offset + sizeof(u32),
   241				 data, len / sizeof(u32));
   242		writel(len, qmp->msgram + qmp->offset);
   243	
   244		/* Read back len to confirm data written in message RAM */
   245		tlen = readl(qmp->msgram + qmp->offset);
   246		qmp_kick(qmp);
   247	
   248		time_left = wait_event_interruptible_timeout(qmp->event,
   249							     qmp_message_empty(qmp), HZ);
   250		if (!time_left) {
   251			dev_err(qmp->dev, "ucore did not ack channel\n");
   252			ret = -ETIMEDOUT;
   253	
   254			/* Clear message from buffer */
   255			writel(0, qmp->msgram + qmp->offset);
   256		} else {
   257			ret = 0;
   258		}
   259	
   260		mutex_unlock(&qmp->tx_lock);
   261	
   262		return ret;
   263	}
   264	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (29891 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ