Re: [PATCH 11/12] i2c: qup: reorganization of driver code to remove polling for qup v1
From: kbuild test robot
Date: Mon Feb 05 2018 - 18:04:05 EST
Hi Abhishek,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on v4.15 next-20180205]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Abhishek-Sahu/Major-code-reorganization-to-make-all-i2c-transfers-working/20180206-035527
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_read_rx_fifo_v1':
>> drivers/i2c/busses/i2c-qup.c:1139:12: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
if ((idx & 1) == 0) {
~~~~~^~~~
vim +/idx +1139 drivers/i2c/busses/i2c-qup.c
191424bb Sricharan R 2016-01-19 1130
3a487e36 Abhishek Sahu 2018-02-03 1131 static void qup_i2c_read_rx_fifo_v1(struct qup_i2c_dev *qup)
10c5a842 Bjorn Andersson 2014-03-13 1132 {
3a487e36 Abhishek Sahu 2018-02-03 1133 struct qup_i2c_block *blk = &qup->blk;
3a487e36 Abhishek Sahu 2018-02-03 1134 struct i2c_msg *msg = qup->msg;
10c5a842 Bjorn Andersson 2014-03-13 1135 u32 val = 0;
10c5a842 Bjorn Andersson 2014-03-13 1136 int idx;
10c5a842 Bjorn Andersson 2014-03-13 1137
3a487e36 Abhishek Sahu 2018-02-03 1138 while (blk->fifo_available && qup->pos < msg->len) {
10c5a842 Bjorn Andersson 2014-03-13 @1139 if ((idx & 1) == 0) {
10c5a842 Bjorn Andersson 2014-03-13 1140 /* Reading 2 words at time */
10c5a842 Bjorn Andersson 2014-03-13 1141 val = readl(qup->base + QUP_IN_FIFO_BASE);
10c5a842 Bjorn Andersson 2014-03-13 1142 msg->buf[qup->pos++] = val & 0xFF;
10c5a842 Bjorn Andersson 2014-03-13 1143 } else {
10c5a842 Bjorn Andersson 2014-03-13 1144 msg->buf[qup->pos++] = val >> QUP_MSW_SHIFT;
10c5a842 Bjorn Andersson 2014-03-13 1145 }
3a487e36 Abhishek Sahu 2018-02-03 1146 idx++;
3a487e36 Abhishek Sahu 2018-02-03 1147 blk->fifo_available--;
10c5a842 Bjorn Andersson 2014-03-13 1148 }
c4f0c5fb Sricharan R 2016-01-19 1149
3a487e36 Abhishek Sahu 2018-02-03 1150 if (qup->pos == msg->len)
3a487e36 Abhishek Sahu 2018-02-03 1151 qup->cur_blk_events |= QUP_BLK_EVENT_RX_DATA_DONE;
10c5a842 Bjorn Andersson 2014-03-13 1152 }
10c5a842 Bjorn Andersson 2014-03-13 1153
:::::: The code at line 1139 was first introduced by commit
:::::: 10c5a8425968f8a43b7039ce6261367fc992289f i2c: qup: New bus driver for the Qualcomm QUP I2C controller
:::::: TO: Bjorn Andersson <bjorn.andersson@xxxxxxxxxxxxxx>
:::::: CC: Wolfram Sang <wsa@xxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip