[zen-kernel-zen-kernel:5.13/zen-sauce 1/4] mm/vmscan.c:188:55: error: 'CONFIG_CLEAN_LOW_KBYTES' undeclared here (not in a function); did you mean 'CONFIG_LEDS_SPI_BYTE'?
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.13/zen-sauce
head: efe513d7401c0d8ee779944de9997da960e257ce
commit: aec8f00a3066a2589dd6ea97d5f86d81c8d40c4a [1/4] mm/vmscan: add sysctl knobs for protecting clean cache
config: nios2-randconfig-r034-20210719 (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.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
# https://github.com/zen-kernel/zen-kernel/commit/aec8f00a3066a2589dd6ea97d...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/zen-sauce
git checkout aec8f00a3066a2589dd6ea97d5f86d81c8d40c4a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> mm/vmscan.c:180:5: warning: "CONFIG_CLEAN_LOW_KBYTES" is not defined, evaluates to 0 [-Wundef]
180 | #if CONFIG_CLEAN_LOW_KBYTES < 0
| ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmscan.c:184:5: warning: "CONFIG_CLEAN_MIN_KBYTES" is not defined, evaluates to 0 [-Wundef]
184 | #if CONFIG_CLEAN_MIN_KBYTES < 0
| ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmscan.c:188:55: error: 'CONFIG_CLEAN_LOW_KBYTES' undeclared here (not in a function); did you mean 'CONFIG_LEDS_SPI_BYTE'?
188 | unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
| ^~~~~~~~~~~~~~~~~~~~~~~
| CONFIG_LEDS_SPI_BYTE
>> mm/vmscan.c:189:55: error: 'CONFIG_CLEAN_MIN_KBYTES' undeclared here (not in a function); did you mean 'CONFIG_LEDS_SPI_BYTE'?
189 | unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
| ^~~~~~~~~~~~~~~~~~~~~~~
| CONFIG_LEDS_SPI_BYTE
vim +188 mm/vmscan.c
179
> 180 #if CONFIG_CLEAN_LOW_KBYTES < 0
181 #error "CONFIG_CLEAN_LOW_KBYTES must be >= 0"
182 #endif
183
> 184 #if CONFIG_CLEAN_MIN_KBYTES < 0
185 #error "CONFIG_CLEAN_MIN_KBYTES must be >= 0"
186 #endif
187
> 188 unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
> 189 unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
190
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c:951 otx2_get_fecparam() warn: always true condition '(pfvf->linfo.fec < 4) => (0-3 < 4)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8baef6386baaefb776bdd09b5c7630cf057c51c6
commit: d0cf9503e908ee7b235a5efecedeb74aabc482f3 octeontx2-pf: ethtool fec mode support
date: 5 months ago
config: ia64-randconfig-m031-20210723 (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c:951 otx2_get_fecparam() warn: always true condition '(pfvf->linfo.fec < 4) => (0-3 < 4)'
Old smatch warnings:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c:962 otx2_get_fecparam() error: buffer overflow 'fec' 4 <= 4
vim +951 drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
939
940 static int otx2_get_fecparam(struct net_device *netdev,
941 struct ethtool_fecparam *fecparam)
942 {
943 struct otx2_nic *pfvf = netdev_priv(netdev);
944 struct cgx_fw_data *rsp;
945 const int fec[] = {
946 ETHTOOL_FEC_OFF,
947 ETHTOOL_FEC_BASER,
948 ETHTOOL_FEC_RS,
949 ETHTOOL_FEC_BASER | ETHTOOL_FEC_RS};
950 #define FEC_MAX_INDEX 4
> 951 if (pfvf->linfo.fec < FEC_MAX_INDEX)
952 fecparam->active_fec = fec[pfvf->linfo.fec];
953
954 rsp = otx2_get_fwdata(pfvf);
955 if (IS_ERR(rsp))
956 return PTR_ERR(rsp);
957
958 if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) {
959 if (!rsp->fwdata.supported_fec)
960 fecparam->fec = ETHTOOL_FEC_NONE;
961 else
962 fecparam->fec = fec[rsp->fwdata.supported_fec];
963 }
964 return 0;
965 }
966
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[zen-kernel-zen-kernel:5.13/zen-sauce 3/23] drivers/i2c/busses/i2c-nct6775.c:221:18: warning: this statement may fall through
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.13/zen-sauce
head: 732e5405c0311f1e32e6e4b0cd30fc104209e6bd
commit: 74e3df8f6e24c8c473b326a1d750de7d8b77b177 [3/23] ZEN: Add OpenRGB patches
config: nios2-randconfig-r034-20210719 (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.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
# https://github.com/zen-kernel/zen-kernel/commit/74e3df8f6e24c8c473b326a1d...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/zen-sauce
git checkout 74e3df8f6e24c8c473b326a1d750de7d8b77b177
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/i2c/busses/i2c-nct6775.c: In function 'nct6775_access':
>> drivers/i2c/busses/i2c-nct6775.c:221:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
221 | tmp_data.byte = data->byte;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/i2c/busses/i2c-nct6775.c:222:3: note: here
222 | case I2C_SMBUS_BYTE:
| ^~~~
At top level:
drivers/i2c/busses/i2c-nct6775.c:93:27: warning: 'nct6775_device_names' defined but not used [-Wunused-const-variable=]
93 | static const char * const nct6775_device_names[] = {
| ^~~~~~~~~~~~~~~~~~~~
vim +221 drivers/i2c/busses/i2c-nct6775.c
197
198 /* Return negative errno on error. */
199 static s32 nct6775_access(struct i2c_adapter * adap, u16 addr,
200 unsigned short flags, char read_write,
201 u8 command, int size, union i2c_smbus_data * data)
202 {
203 struct i2c_nct6775_adapdata *adapdata = i2c_get_adapdata(adap);
204 unsigned short nuvoton_nct6793d_smba = adapdata->smba;
205 int i, len, cnt;
206 union i2c_smbus_data tmp_data;
207 int timeout = 0;
208
209 tmp_data.word = 0;
210 cnt = 0;
211 len = 0;
212
213 outb_p(NCT6793D_SOFT_RESET, SMBHSTCTL);
214
215 switch (size) {
216 case I2C_SMBUS_QUICK:
217 outb_p((addr << 1) | read_write,
218 SMBHSTADD);
219 break;
220 case I2C_SMBUS_BYTE_DATA:
> 221 tmp_data.byte = data->byte;
222 case I2C_SMBUS_BYTE:
223 outb_p((addr << 1) | read_write,
224 SMBHSTADD);
225 outb_p(command, SMBHSTIDX);
226 if (read_write == I2C_SMBUS_WRITE) {
227 outb_p(tmp_data.byte, SMBHSTDAT);
228 outb_p(NCT6793D_WRITE_BYTE, SMBHSTCMD);
229 }
230 else {
231 outb_p(NCT6793D_READ_BYTE, SMBHSTCMD);
232 }
233 break;
234 case I2C_SMBUS_WORD_DATA:
235 outb_p((addr << 1) | read_write,
236 SMBHSTADD);
237 outb_p(command, SMBHSTIDX);
238 if (read_write == I2C_SMBUS_WRITE) {
239 outb_p(data->word & 0xff, SMBHSTDAT);
240 outb_p((data->word & 0xff00) >> 8, SMBHSTDAT);
241 outb_p(NCT6793D_WRITE_WORD, SMBHSTCMD);
242 }
243 else {
244 outb_p(NCT6793D_READ_WORD, SMBHSTCMD);
245 }
246 break;
247 case I2C_SMBUS_BLOCK_DATA:
248 outb_p((addr << 1) | read_write,
249 SMBHSTADD);
250 outb_p(command, SMBHSTIDX);
251 if (read_write == I2C_SMBUS_WRITE) {
252 len = data->block[0];
253 if (len == 0 || len > I2C_SMBUS_BLOCK_MAX)
254 return -EINVAL;
255 outb_p(len, SMBBLKSZ);
256
257 cnt = 1;
258 if (len >= 4) {
259 for (i = cnt; i <= 4; i++) {
260 outb_p(data->block[i], SMBHSTDAT);
261 }
262
263 len -= 4;
264 cnt += 4;
265 }
266 else {
267 for (i = cnt; i <= len; i++ ) {
268 outb_p(data->block[i], SMBHSTDAT);
269 }
270
271 len = 0;
272 }
273
274 outb_p(NCT6793D_WRITE_BLOCK, SMBHSTCMD);
275 }
276 else {
277 return -ENOTSUPP;
278 }
279 break;
280 default:
281 dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
282 return -EOPNOTSUPP;
283 }
284
285 outb_p(NCT6793D_MANUAL_START, SMBHSTCTL);
286
287 while ((size == I2C_SMBUS_BLOCK_DATA) && (len > 0)) {
288 if (read_write == I2C_SMBUS_WRITE) {
289 timeout = 0;
290 while ((inb_p(SMBHSTSTS) & NCT6793D_FIFO_EMPTY) == 0)
291 {
292 if(timeout > MAX_RETRIES)
293 {
294 return -ETIMEDOUT;
295 }
296 usleep_range(250, 500);
297 timeout++;
298 }
299
300 //Load more bytes into FIFO
301 if (len >= 4) {
302 for (i = cnt; i <= (cnt + 4); i++) {
303 outb_p(data->block[i], SMBHSTDAT);
304 }
305
306 len -= 4;
307 cnt += 4;
308 }
309 else {
310 for (i = cnt; i <= (cnt + len); i++) {
311 outb_p(data->block[i], SMBHSTDAT);
312 }
313
314 len = 0;
315 }
316 }
317 else {
318 return -ENOTSUPP;
319 }
320
321 }
322
323 //wait for manual mode to complete
324 timeout = 0;
325 while ((inb_p(SMBHSTSTS) & NCT6793D_MANUAL_ACTIVE) != 0)
326 {
327 if(timeout > MAX_RETRIES)
328 {
329 return -ETIMEDOUT;
330 }
331 usleep_range(250, 500);
332 timeout++;
333 }
334
335 if ((inb_p(SMBHSTERR) & NCT6793D_NO_ACK) != 0) {
336 return -ENXIO;
337 }
338 else if ((read_write == I2C_SMBUS_WRITE) || (size == I2C_SMBUS_QUICK)) {
339 return 0;
340 }
341
342 switch (size) {
343 case I2C_SMBUS_QUICK:
344 case I2C_SMBUS_BYTE_DATA:
345 data->byte = inb_p(SMBHSTDAT);
346 break;
347 case I2C_SMBUS_WORD_DATA:
348 data->word = inb_p(SMBHSTDAT) + (inb_p(SMBHSTDAT) << 8);
349 break;
350 }
351 return 0;
352 }
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [RFC 3/4] power: supply: Add charger driver for Rockchip RK817
by kernel test robot
Hi Chris,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on rockchip/for-next]
[also build test WARNING on power-supply/for-next v5.14-rc2 next-20210722]
[cannot apply to lee-mfd/for-mfd-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Chris-Morgan/power-supply-Add-Su...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: x86_64-randconfig-r031-20210723 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/8054ca1dc455218984a38432a1d39530c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Morgan/power-supply-Add-Support-for-RK817-Charger/20210723-031508
git checkout 8054ca1dc455218984a38432a1d39530cd287b38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/power/supply/rk817_charger.c:152:2: warning: variable 'out' is uninitialized when used here [-Wuninitialized]
out |= tmp;
^~~
drivers/power/supply/rk817_charger.c:146:14: note: initialize the variable 'out' to silence this warning
uint32_t out;
^
= 0
>> drivers/power/supply/rk817_charger.c:875:14: warning: address of array 'info->ocv_table' will always evaluate to 'true' [-Wpointer-bool-conversion]
(!info->ocv_table)) {
~~~~~~~^~~~~~~~~
2 warnings generated.
vim +/out +152 drivers/power/supply/rk817_charger.c
142
143 static int rk817_get_reg_hl(struct rk817_charger *charger, int regH, int regL)
144 {
145 int tmp, ret;
146 uint32_t out;
147 struct rk808 *rk808 = charger->rk808;
148
149 ret = regmap_read(rk808->regmap, regL, &tmp);
150 if (ret)
151 return ret;
> 152 out |= tmp;
153
154 ret = regmap_read(rk808->regmap, regH, &tmp);
155 if (ret)
156 return ret;
157 out |= tmp << 8;
158
159 return out;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[hyperv-linux:hyperv-next 3/8] drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head: 63fb60c2fcc94d595a184fa187bdfb25e5ecd4a2
commit: afca4d95dd7d7936d46a0ff02169cc40f534a6a3 [3/8] Drivers: hv: Make portions of Hyper-V init code be arch neutral
config: x86_64-randconfig-s022-20210723 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?...
git remote add hyperv-linux https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
git fetch --no-tags hyperv-linux hyperv-next
git checkout afca4d95dd7d7936d46a0ff02169cc40f534a6a3
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg @@
drivers/hv/hv_common.c:61:21: sparse: expected void [noderef] __percpu *__pdata
drivers/hv/hv_common.c:61:21: sparse: got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg
drivers/hv/hv_common.c:64:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg @@
drivers/hv/hv_common.c:64:21: sparse: expected void [noderef] __percpu *__pdata
drivers/hv/hv_common.c:64:21: sparse: got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg
drivers/hv/hv_common.c:78:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg @@ got void *[noderef] __percpu * @@
drivers/hv/hv_common.c:78:31: sparse: expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg
drivers/hv/hv_common.c:78:31: sparse: got void *[noderef] __percpu *
>> drivers/hv/hv_common.c:83:40: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg @@ got void *[noderef] __percpu * @@
drivers/hv/hv_common.c:83:40: sparse: expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg
drivers/hv/hv_common.c:83:40: sparse: got void *[noderef] __percpu *
drivers/hv/hv_common.c:116:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
drivers/hv/hv_common.c:116:29: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/hv/hv_common.c:116:29: sparse: got void [noderef] __percpu **
drivers/hv/hv_common.c:122:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
drivers/hv/hv_common.c:122:38: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/hv/hv_common.c:122:38: sparse: got void [noderef] __percpu **
drivers/hv/hv_common.c:144:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
drivers/hv/hv_common.c:144:29: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/hv/hv_common.c:144:29: sparse: got void [noderef] __percpu **
drivers/hv/hv_common.c:149:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void [noderef] __percpu ** @@
drivers/hv/hv_common.c:149:38: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/hv/hv_common.c:149:38: sparse: got void [noderef] __percpu **
vim +61 drivers/hv/hv_common.c
49
50 /*
51 * Hyper-V specific initialization and shutdown code that is
52 * common across all architectures. Called from architecture
53 * specific initialization functions.
54 */
55
56 void __init hv_common_free(void)
57 {
58 kfree(hv_vp_index);
59 hv_vp_index = NULL;
60
> 61 free_percpu(hyperv_pcpu_output_arg);
62 hyperv_pcpu_output_arg = NULL;
63
64 free_percpu(hyperv_pcpu_input_arg);
65 hyperv_pcpu_input_arg = NULL;
66 }
67
68 int __init hv_common_init(void)
69 {
70 int i;
71
72 /*
73 * Allocate the per-CPU state for the hypercall input arg.
74 * If this allocation fails, we will not be able to setup
75 * (per-CPU) hypercall input page and thus this failure is
76 * fatal on Hyper-V.
77 */
78 hyperv_pcpu_input_arg = alloc_percpu(void *);
79 BUG_ON(!hyperv_pcpu_input_arg);
80
81 /* Allocate the per-CPU state for output arg for root */
82 if (hv_root_partition) {
> 83 hyperv_pcpu_output_arg = alloc_percpu(void *);
84 BUG_ON(!hyperv_pcpu_output_arg);
85 }
86
87 hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
88 GFP_KERNEL);
89 if (!hv_vp_index) {
90 hv_common_free();
91 return -ENOMEM;
92 }
93
94 for (i = 0; i < num_possible_cpus(); i++)
95 hv_vp_index[i] = VP_INVAL;
96
97 return 0;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[zen-kernel-zen-kernel:5.13/futex2-tkg 3/15] kernel/futex2.c:731:37: error: invalid use of undefined type 'struct compat_futex_waitv'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.13/futex2-tkg
head: 8eb940ffa39f19c4ddf284615dfb27a6444a3c1d
commit: e0c5fabdb1a5efa8d1c606485e22709fd4f90fb5 [3/15] futex2: Implement vectorized wait
config: mips-loongson2k_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 10.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
# https://github.com/zen-kernel/zen-kernel/commit/e0c5fabdb1a5efa8d1c606485...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/futex2-tkg
git checkout e0c5fabdb1a5efa8d1c606485e22709fd4f90fb5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/futex2.c:723:16: warning: 'struct compat_futex_waitv' declared inside parameter list will not be visible outside of this definition or declaration
723 | struct compat_futex_waitv __user *uwaitv,
| ^~~~~~~~~~~~~~~~~~
kernel/futex2.c: In function 'compat_futex_parse_waitv':
kernel/futex2.c:727:28: error: storage size of 'waitv' isn't known
727 | struct compat_futex_waitv waitv;
| ^~~~~
>> kernel/futex2.c:731:37: error: invalid use of undefined type 'struct compat_futex_waitv'
731 | if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
| ^
>> kernel/futex2.c:740:31: error: implicit declaration of function 'compat_ptr' [-Werror=implicit-function-declaration]
740 | futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
| ^~~~~~~~~~
kernel/futex2.c:727:28: warning: unused variable 'waitv' [-Wunused-variable]
727 | struct compat_futex_waitv waitv;
| ^~~~~
kernel/futex2.c: At top level:
>> kernel/futex2.c:759:36: error: expected ')' before 'struct'
759 | COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
| ^~~~~~~
| )
kernel/futex2.c:722:12: warning: 'compat_futex_parse_waitv' defined but not used [-Wunused-function]
722 | static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +731 kernel/futex2.c
712
713 #ifdef CONFIG_COMPAT
714 /**
715 * compat_futex_parse_waitv - Parse a waitv array from userspace
716 * @futexv: Kernel side list of waiters to be filled
717 * @uwaitv: Userspace list to be parsed
718 * @nr_futexes: Length of futexv
719 *
720 * Return: Error code on failure, pointer to a prepared futexv otherwise
721 */
722 static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
723 struct compat_futex_waitv __user *uwaitv,
724 unsigned int nr_futexes)
725 {
726 struct futex_bucket *bucket;
727 struct compat_futex_waitv waitv;
728 unsigned int i;
729
730 for (i = 0; i < nr_futexes; i++) {
> 731 if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
732 return -EFAULT;
733
734 if ((waitv.flags & ~FUTEXV_WAITER_MASK) ||
735 (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32)
736 return -EINVAL;
737
738 futexv->objects[i].key.pointer = 0;
739 futexv->objects[i].flags = waitv.flags;
> 740 futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
741 futexv->objects[i].val = waitv.val;
742 futexv->objects[i].index = i;
743
744 bucket = futex_get_bucket(compat_ptr(waitv.uaddr),
745 &futexv->objects[i].key,
746 is_object_shared);
747
748 if (IS_ERR(bucket))
749 return PTR_ERR(bucket);
750
751 futexv->objects[i].bucket = bucket;
752
753 INIT_LIST_HEAD(&futexv->objects[i].list);
754 }
755
756 return 0;
757 }
758
> 759 COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
760 unsigned int, nr_futexes, unsigned int, flags,
761 struct __kernel_timespec __user *, timo)
762 {
763 struct futex_waiter_head *futexv;
764 int ret;
765
766 if (flags & ~FUTEXV_MASK)
767 return -EINVAL;
768
769 if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
770 return -EINVAL;
771
772 futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) +
773 sizeof(*futexv), GFP_KERNEL);
774 if (!futexv)
775 return -ENOMEM;
776
777 futexv->hint = false;
778 futexv->task = current;
779
780 ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
781
782 if (!ret)
783 ret = futex_set_timer_and_wait(futexv, nr_futexes, timo, flags);
784
785 kfree(futexv);
786
787 return ret;
788 }
789 #endif
790
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[bvanassche:configfs 1/3] fs/configfs/file.c:234:6: warning: variable 'written' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://github.com/bvanassche/linux configfs
head: d039a111183e8b3aafba81b0bbc4bf620e79b818
commit: 314a1ff31221fcdf3d62e0142b4212d6410e4173 [1/3] configfs: Improve writing at a non-zero offset
config: x86_64-randconfig-r031-20210723 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/bvanassche/linux/commit/314a1ff31221fcdf3d62e0142b4212...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche configfs
git checkout 314a1ff31221fcdf3d62e0142b4212d6410e4173
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/configfs/file.c:234:6: warning: variable 'written' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (len > 0)
^~~~~~~
fs/configfs/file.c:236:6: note: uninitialized use occurs here
if (written > 0)
^~~~~~~
fs/configfs/file.c:234:2: note: remove the 'if' if its condition is always true
if (len > 0)
^~~~~~~~~~~~
fs/configfs/file.c:230:22: note: initialize the variable 'written' to silence this warning
ssize_t len, written;
^
= 0
1 warning generated.
vim +234 fs/configfs/file.c
7063fbf2261194 Joel Becker 2005-12-15 217
7063fbf2261194 Joel Becker 2005-12-15 218
44b9a000df5cc1 Christoph Hellwig 2021-05-25 219 /*
7063fbf2261194 Joel Becker 2005-12-15 220 * There is no easy way for us to know if userspace is only doing a partial
44b9a000df5cc1 Christoph Hellwig 2021-05-25 221 * write, so we don't support them. We expect the entire buffer to come on the
44b9a000df5cc1 Christoph Hellwig 2021-05-25 222 * first write.
44b9a000df5cc1 Christoph Hellwig 2021-05-25 223 * Hint: if you're writing a value, first read the file, modify only the value
44b9a000df5cc1 Christoph Hellwig 2021-05-25 224 * you're changing, then write entire buffer back.
7063fbf2261194 Joel Becker 2005-12-15 225 */
7fe1e79b59ba02 Bart Van Assche 2021-05-25 226 static ssize_t configfs_write_iter(struct kiocb *iocb, struct iov_iter *from)
7063fbf2261194 Joel Becker 2005-12-15 227 {
7fe1e79b59ba02 Bart Van Assche 2021-05-25 228 struct file *file = iocb->ki_filp;
7063fbf2261194 Joel Becker 2005-12-15 229 struct configfs_buffer *buffer = file->private_data;
314a1ff31221fc Bart Van Assche 2021-07-22 230 ssize_t len, written;
7063fbf2261194 Joel Becker 2005-12-15 231
6d748924b753d6 Johannes Berg 2007-06-22 232 mutex_lock(&buffer->mutex);
420405ecde061f Bart Van Assche 2021-07-13 233 len = fill_write_buffer(buffer, iocb->ki_pos, from);
3d0f89bb169482 Joel Becker 2006-01-25 @234 if (len > 0)
314a1ff31221fc Bart Van Assche 2021-07-22 235 written = flush_write_buffer(file, buffer, iocb->ki_pos + len);
314a1ff31221fc Bart Van Assche 2021-07-22 236 if (written > 0)
7fe1e79b59ba02 Bart Van Assche 2021-05-25 237 iocb->ki_pos += len;
6d748924b753d6 Johannes Berg 2007-06-22 238 mutex_unlock(&buffer->mutex);
3d0f89bb169482 Joel Becker 2006-01-25 239 return len;
7063fbf2261194 Joel Becker 2005-12-15 240 }
7063fbf2261194 Joel Becker 2005-12-15 241
:::::: The code at line 234 was first introduced by commit
:::::: 3d0f89bb169482d26d5aa4e82e763077e7e9bc4d configfs: Add permission and ownership to configfs objects.
:::::: TO: Joel Becker <joel.becker(a)oracle.com>
:::::: CC: Mark Fasheh <mark.fasheh(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.4 1721/1765] drivers/pinctrl/core.c:1273:6: warning: 'ret' may be used uninitialized in this function
by kernel test robot
Hi Michal,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 2f686fa6c0bf7fa168dc45dd7ce1359217212911
commit: c82e9765704a437b642de708cdf3c06535e07a89 [1721/1765] pinctrl: core: Handling pinmux and pinconf separately
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/c82e9765704a437b642de708cdf3c...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout c82e9765704a437b642de708cdf3c06535e07a89
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
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/pinctrl/core.c: In function 'pinctrl_commit_state':
>> drivers/pinctrl/core.c:1273:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
1273 | if (ret < 0)
| ^
vim +/ret +1273 drivers/pinctrl/core.c
1231
1232 /**
1233 * pinctrl_commit_state() - select/activate/program a pinctrl state to HW
1234 * @p: the pinctrl handle for the device that requests configuration
1235 * @state: the state handle to select/activate/program
1236 */
1237 static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
1238 {
1239 struct pinctrl_setting *setting, *setting2;
1240 struct pinctrl_state *old_state = p->state;
1241 int ret;
1242
1243 if (p->state) {
1244 /*
1245 * For each pinmux setting in the old state, forget SW's record
1246 * of mux owner for that pingroup. Any pingroups which are
1247 * still owned by the new state will be re-acquired by the call
1248 * to pinmux_enable_setting() in the loop below.
1249 */
1250 list_for_each_entry(setting, &p->state->settings, node) {
1251 if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
1252 continue;
1253 pinmux_disable_setting(setting);
1254 }
1255 }
1256
1257 p->state = NULL;
1258
1259 /* Apply all the settings for the new state - pinmux first */
1260 list_for_each_entry(setting, &state->settings, node) {
1261 switch (setting->type) {
1262 case PIN_MAP_TYPE_MUX_GROUP:
1263 ret = pinmux_enable_setting(setting);
1264 break;
1265 case PIN_MAP_TYPE_CONFIGS_PIN:
1266 case PIN_MAP_TYPE_CONFIGS_GROUP:
1267 break;
1268 default:
1269 ret = -EINVAL;
1270 break;
1271 }
1272
> 1273 if (ret < 0)
1274 goto unapply_new_state;
1275
1276 /* Do not link hogs (circular dependency) */
1277 if (p != setting->pctldev->p)
1278 pinctrl_link_add(setting->pctldev, p->dev);
1279 }
1280
1281 /* Apply all the settings for the new state - pinconf after */
1282 list_for_each_entry(setting, &state->settings, node) {
1283 switch (setting->type) {
1284 case PIN_MAP_TYPE_MUX_GROUP:
1285 break;
1286 case PIN_MAP_TYPE_CONFIGS_PIN:
1287 case PIN_MAP_TYPE_CONFIGS_GROUP:
1288 ret = pinconf_apply_setting(setting);
1289 break;
1290 default:
1291 ret = -EINVAL;
1292 break;
1293 }
1294
1295 if (ret < 0) {
1296 goto unapply_new_state;
1297 }
1298
1299 /* Do not link hogs (circular dependency) */
1300 if (p != setting->pctldev->p)
1301 pinctrl_link_add(setting->pctldev, p->dev);
1302 }
1303
1304 p->state = state;
1305
1306 return 0;
1307
1308 unapply_new_state:
1309 dev_err(p->dev, "Error applying setting, reverse things back\n");
1310
1311 list_for_each_entry(setting2, &state->settings, node) {
1312 if (&setting2->node == &setting->node)
1313 break;
1314 /*
1315 * All we can do here is pinmux_disable_setting.
1316 * That means that some pins are muxed differently now
1317 * than they were before applying the setting (We can't
1318 * "unmux a pin"!), but it's not a big deal since the pins
1319 * are free to be muxed by another apply_setting.
1320 */
1321 if (setting2->type == PIN_MAP_TYPE_MUX_GROUP)
1322 pinmux_disable_setting(setting2);
1323 }
1324
1325 /* There's no infinite recursive loop here because p->state is NULL */
1326 if (old_state)
1327 pinctrl_select_state(p, old_state);
1328
1329 return ret;
1330 }
1331
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month