[norov:bm-new1 2/15] drivers/infiniband/sw/siw/siw_main.c:196:6: warning: variable 'num_cpus' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://github.com/norov/linux bm-new1
head: 4c8fba87b160a8063bdd06928dbfc058e26a85db
commit: 80216b2d5ee90bb6dea0aaa7224948f6deb3ae83 [2/15] lib/cpumask: replace cpumask_weight with cpumask_empty where appropriate
config: x86_64-randconfig-a012-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151203.qazbGUpx-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/norov/linux/commit/80216b2d5ee90bb6dea0aaa7224948f6deb...
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bm-new1
git checkout 80216b2d5ee90bb6dea0aaa7224948f6deb3ae83
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/infiniband/sw/siw/
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/infiniband/sw/siw/siw_main.c:196:6: warning: variable 'num_cpus' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (cpumask_empty(tx_cpumask)) {
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_main.c:201:7: note: uninitialized use occurs here
if (!num_cpus)
^~~~~~~~
drivers/infiniband/sw/siw/siw_main.c:196:2: note: remove the 'if' if its condition is always true
if (cpumask_empty(tx_cpumask)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_main.c:189:17: note: initialize the variable 'num_cpus' to silence this warning
int i, num_cpus, cpu, min_use, node = sdev->numa_node, tx_cpu = -1;
^
= 0
1 warning generated.
vim +196 drivers/infiniband/sw/siw/siw_main.c
181
182 /*
183 * Choose CPU with least number of active QP's from NUMA node of
184 * TX interface.
185 */
186 int siw_get_tx_cpu(struct siw_device *sdev)
187 {
188 const struct cpumask *tx_cpumask;
189 int i, num_cpus, cpu, min_use, node = sdev->numa_node, tx_cpu = -1;
190
191 if (node < 0)
192 tx_cpumask = cpu_online_mask;
193 else
194 tx_cpumask = siw_cpu_info.tx_valid_cpus[node];
195
> 196 if (cpumask_empty(tx_cpumask)) {
197 /* no CPU on this NUMA node */
198 tx_cpumask = cpu_online_mask;
199 num_cpus = cpumask_weight(tx_cpumask);
200 }
201 if (!num_cpus)
202 goto out;
203
204 cpu = cpumask_first(tx_cpumask);
205
206 for (i = 0, min_use = SIW_MAX_QP; i < num_cpus;
207 i++, cpu = cpumask_next(cpu, tx_cpumask)) {
208 int usage;
209
210 /* Skip any cores which have no TX thread */
211 if (!siw_tx_thread[cpu])
212 continue;
213
214 usage = atomic_read(&per_cpu(siw_use_cnt, cpu));
215 if (usage <= min_use) {
216 tx_cpu = cpu;
217 min_use = usage;
218 }
219 }
220 siw_dbg(&sdev->base_dev,
221 "tx cpu %d, node %d, %d qp's\n", tx_cpu, node, min_use);
222
223 out:
224 if (tx_cpu >= 0)
225 atomic_inc(&per_cpu(siw_use_cnt, tx_cpu));
226 else
227 pr_warn("siw: no tx cpu found\n");
228
229 return tx_cpu;
230 }
231
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 1277/1768] include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct of_mm_gpio_chip'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1768] gpio: xilinx: Use xilinx tested gpio driver
config: i386-randconfig-a012-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151224.vVH8KhLu-lk...)
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/af0c19b6f15388c55431728043310...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpio/
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 >>):
drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
68 | struct of_mm_gpio_chip mmchip;
| ^~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_get':
drivers/gpio/gpio-xilinx.c:94:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror=implicit-function-declaration]
94 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:94:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
In file included from arch/x86/include/asm/bitops.h:16,
from include/linux/bitops.h:26,
from drivers/gpio/gpio-xilinx.c:15:
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct of_mm_gpio_chip'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:96:6: note: in expansion of macro 'container_of'
96 | container_of(mm_gc, struct xgpio_instance, mmchip);
| ^~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set':
drivers/gpio/gpio-xilinx.c:115:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
115 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set_multiple':
drivers/gpio/gpio-xilinx.c:147:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
147 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_in':
drivers/gpio/gpio-xilinx.c:187:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
187 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_out':
drivers/gpio/gpio-xilinx.c:218:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
218 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_xlate':
drivers/gpio/gpio-xilinx.c:274:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
274 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
277 | if (gc->of_gpio_n_cells == 3 && flags)
| ^~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_to_irq':
drivers/gpio/gpio-xilinx.c:392:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
392 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_remove':
drivers/gpio/gpio-xilinx.c:576:2: error: implicit declaration of function 'of_mm_gpiochip_remove'; did you mean 'gpiochip_remove'? [-Werror=implicit-function-declaration]
576 | of_mm_gpiochip_remove(&chip->mmchip);
| ^~~~~~~~~~~~~~~~~~~~~
| gpiochip_remove
drivers/gpio/gpio-xilinx.c: In function 'xgpio_of_probe':
drivers/gpio/gpio-xilinx.c:676:11: error: implicit declaration of function 'of_mm_gpiochip_add'; did you mean 'gpiochip_add'? [-Werror=implicit-function-declaration]
676 | status = of_mm_gpiochip_add(np, &chip->mmchip);
| ^~~~~~~~~~~~~~~~~~
| gpiochip_add
cc1: some warnings being treated as errors
vim +994 include/linux/kernel.h
cf14f27f82af78 Alexei Starovoitov 2018-03-28 984
^1da177e4c3f41 Linus Torvalds 2005-04-16 985 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 986 * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds 2005-04-16 987 * @ptr: the pointer to the member.
^1da177e4c3f41 Linus Torvalds 2005-04-16 988 * @type: the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds 2005-04-16 989 * @member: the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16 990 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 991 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 992 #define container_of(ptr, type, member) ({ \
c7acec713d14c6 Ian Abbott 2017-07-12 993 void *__mptr = (void *)(ptr); \
c7acec713d14c6 Ian Abbott 2017-07-12 @994 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
c7acec713d14c6 Ian Abbott 2017-07-12 995 !__same_type(*(ptr), void), \
c7acec713d14c6 Ian Abbott 2017-07-12 996 "pointer type mismatch in container_of()"); \
c7acec713d14c6 Ian Abbott 2017-07-12 997 ((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds 2005-04-16 998
:::::: The code at line 994 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
:::::: TO: Ian Abbott <abbotti(a)mev.co.uk>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 904/1768] gadget.c:(.text+0x1258): multiple definition of `dwc3_set_simple_data'; drivers/usb/dwc3/core.o:core.c:(.text+0x1052): first defined here
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 3d600fd776cbda29abdea084f7437f7d9102b2a5 [904/1768] usb: dwc3: Add support for removing vbus when suspended
config: m68k-randconfig-r014-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151205.Y5RcYl6z-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.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/Xilinx/linux-xlnx/commit/3d600fd776cbda29abdea084f7437...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout 3d600fd776cbda29abdea084f7437f7d9102b2a5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k 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 >>):
m68k-linux-ld: drivers/usb/dwc3/gadget.o: in function `dwc3_simple_wakeup_capable':
gadget.c:(.text+0x1250): multiple definition of `dwc3_simple_wakeup_capable'; drivers/usb/dwc3/core.o:core.c:(.text+0x104a): first defined here
m68k-linux-ld: drivers/usb/dwc3/gadget.o: in function `dwc3_set_simple_data':
>> gadget.c:(.text+0x1258): multiple definition of `dwc3_set_simple_data'; drivers/usb/dwc3/core.o:core.c:(.text+0x1052): first defined here
m68k-linux-ld: drivers/usb/dwc3/ep0.o: in function `dwc3_simple_wakeup_capable':
ep0.c:(.text+0xde2): multiple definition of `dwc3_simple_wakeup_capable'; drivers/usb/dwc3/core.o:core.c:(.text+0x104a): first defined here
m68k-linux-ld: drivers/usb/dwc3/ep0.o: in function `dwc3_set_simple_data':
ep0.c:(.text+0xdea): multiple definition of `dwc3_set_simple_data'; drivers/usb/dwc3/core.o:core.c:(.text+0x1052): first defined here
m68k-linux-ld: drivers/usb/dwc3/ulpi.o: in function `dwc3_simple_wakeup_capable':
ulpi.c:(.text+0x2d6): multiple definition of `dwc3_simple_wakeup_capable'; drivers/usb/dwc3/core.o:core.c:(.text+0x104a): first defined here
m68k-linux-ld: drivers/usb/dwc3/ulpi.o: in function `dwc3_set_simple_data':
ulpi.c:(.text+0x2de): multiple definition of `dwc3_set_simple_data'; drivers/usb/dwc3/core.o:core.c:(.text+0x1052): first defined here
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 1138/1768] drivers/rtc/rtc-zynqmp.c:198: undefined reference to `__divdi3'
by kernel test robot
Hi Srinivas,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: a4704c54d84d1e391275ad6ac10ce0e7c9157505 [1138/1768] rtc: zynqmp: Add calibration set and get support
config: i386-randconfig-a005-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151241.9uhyjqbB-lk...)
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/a4704c54d84d1e391275ad6ac10ce...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout a4704c54d84d1e391275ad6ac10ce0e7c9157505
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 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 >>):
ld: drivers/rtc/rtc-zynqmp.o: in function `xlnx_rtc_read_offset':
>> drivers/rtc/rtc-zynqmp.c:198: undefined reference to `__divdi3'
ld: drivers/rtc/rtc-zynqmp.o: in function `xlnx_rtc_set_offset':
drivers/rtc/rtc-zynqmp.c:223: undefined reference to `__divdi3'
vim +198 drivers/rtc/rtc-zynqmp.c
192
193 static int xlnx_rtc_read_offset(struct device *dev, long *offset)
194 {
195 struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev);
196 long offset_val;
197 unsigned int reg;
> 198 unsigned int tick_mult = RTC_PPB / xrtcdev->calibval;
199
200 reg = readl(xrtcdev->reg_base + RTC_CALIB_RD);
201
202 /* Offset with seconds ticks */
203 offset_val = reg & RTC_TICK_MASK;
204 offset_val = offset_val - xrtcdev->calibval;
205 offset_val = offset_val * tick_mult;
206
207 /* Offset with fractional ticks */
208 if (reg & RTC_FR_EN)
209 offset_val += ((reg & RTC_FR_MASK) >> RTC_FR_DATSHIFT)
210 * (tick_mult / RTC_FR_MAX_TICKS);
211 *offset = offset_val;
212
213 return 0;
214 }
215
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 935/1768] drivers/usb/dwc3/core.h:1459:6: warning: no previous prototype for 'dwc3_mask_phy_reset'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 128feece434d1c02d2dfac7e4103b2c73b6afb27 [935/1768] usb: dwc3: Add support for masking phy reset signal
config: i386-randconfig-r006-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151138.t9cAIzLd-lk...)
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/128feece434d1c02d2dfac7e4103b...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout 128feece434d1c02d2dfac7e4103b2c73b6afb27
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/
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 >>):
In file included from drivers/usb/dwc3/core.c:36:
drivers/usb/dwc3/core.h:1451:6: warning: no previous prototype for 'dwc3_simple_wakeup_capable' [-Wmissing-prototypes]
1451 | void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1453:6: warning: no previous prototype for 'dwc3_set_simple_data' [-Wmissing-prototypes]
1453 | void dwc3_set_simple_data(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1455:6: warning: no previous prototype for 'dwc3_simple_check_quirks' [-Wmissing-prototypes]
1455 | void dwc3_simple_check_quirks(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1457:5: warning: no previous prototype for 'dwc3_set_usb_core_power' [-Wmissing-prototypes]
1457 | int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.h:1459:6: warning: no previous prototype for 'dwc3_mask_phy_reset' [-Wmissing-prototypes]
1459 | void dwc3_mask_phy_reset(struct device *dev, bool mask)
| ^~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:386:6: warning: no previous prototype for 'dwc3_free_event_buffers' [-Wmissing-prototypes]
386 | void dwc3_free_event_buffers(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:403:5: warning: no previous prototype for 'dwc3_alloc_event_buffers' [-Wmissing-prototypes]
403 | int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/dwc3/core.c:36:
drivers/usb/dwc3/core.h: In function 'dwc3_set_usb_core_power':
drivers/usb/dwc3/core.h:1458:5: warning: control reaches end of non-void function [-Wreturn-type]
1458 | { ; }
| ^
--
In file included from drivers/usb/dwc3/trace.h:19,
from drivers/usb/dwc3/trace.c:11:
drivers/usb/dwc3/core.h:1451:6: warning: no previous prototype for 'dwc3_simple_wakeup_capable' [-Wmissing-prototypes]
1451 | void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1453:6: warning: no previous prototype for 'dwc3_set_simple_data' [-Wmissing-prototypes]
1453 | void dwc3_set_simple_data(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1455:6: warning: no previous prototype for 'dwc3_simple_check_quirks' [-Wmissing-prototypes]
1455 | void dwc3_simple_check_quirks(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1457:5: warning: no previous prototype for 'dwc3_set_usb_core_power' [-Wmissing-prototypes]
1457 | int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.h:1459:6: warning: no previous prototype for 'dwc3_mask_phy_reset' [-Wmissing-prototypes]
1459 | void dwc3_mask_phy_reset(struct device *dev, bool mask)
| ^~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h: In function 'dwc3_set_usb_core_power':
drivers/usb/dwc3/core.h:1458:5: warning: control reaches end of non-void function [-Wreturn-type]
1458 | { ; }
| ^
--
In file included from drivers/usb/dwc3/host.c:12:
include/linux/usb/xhci_pdriver.h:22:6: warning: no previous prototype for 'dwc3_host_wakeup_capable' [-Wmissing-prototypes]
22 | void dwc3_host_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/dwc3/host.c:14:
drivers/usb/dwc3/core.h:1451:6: warning: no previous prototype for 'dwc3_simple_wakeup_capable' [-Wmissing-prototypes]
1451 | void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1453:6: warning: no previous prototype for 'dwc3_set_simple_data' [-Wmissing-prototypes]
1453 | void dwc3_set_simple_data(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1455:6: warning: no previous prototype for 'dwc3_simple_check_quirks' [-Wmissing-prototypes]
1455 | void dwc3_simple_check_quirks(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1457:5: warning: no previous prototype for 'dwc3_set_usb_core_power' [-Wmissing-prototypes]
1457 | int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.h:1459:6: warning: no previous prototype for 'dwc3_mask_phy_reset' [-Wmissing-prototypes]
1459 | void dwc3_mask_phy_reset(struct device *dev, bool mask)
| ^~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/host.c:16:6: error: redefinition of 'dwc3_host_wakeup_capable'
16 | void dwc3_host_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/dwc3/host.c:12:
include/linux/usb/xhci_pdriver.h:22:6: note: previous definition of 'dwc3_host_wakeup_capable' was here
22 | void dwc3_host_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/dwc3/host.c:14:
drivers/usb/dwc3/core.h: In function 'dwc3_set_usb_core_power':
drivers/usb/dwc3/core.h:1458:5: warning: control reaches end of non-void function [-Wreturn-type]
1458 | { ; }
| ^
--
In file included from drivers/usb/dwc3/trace.h:19,
from drivers/usb/dwc3/trace.c:11:
drivers/usb/dwc3/core.h:1451:6: warning: no previous prototype for 'dwc3_simple_wakeup_capable' [-Wmissing-prototypes]
1451 | void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1453:6: warning: no previous prototype for 'dwc3_set_simple_data' [-Wmissing-prototypes]
1453 | void dwc3_set_simple_data(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1455:6: warning: no previous prototype for 'dwc3_simple_check_quirks' [-Wmissing-prototypes]
1455 | void dwc3_simple_check_quirks(struct dwc3 *dwc)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1457:5: warning: no previous prototype for 'dwc3_set_usb_core_power' [-Wmissing-prototypes]
1457 | int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.h:1459:6: warning: no previous prototype for 'dwc3_mask_phy_reset' [-Wmissing-prototypes]
1459 | void dwc3_mask_phy_reset(struct device *dev, bool mask)
| ^~~~~~~~~~~~~~~~~~~
In file included from drivers/usb/dwc3/trace.h:343,
from drivers/usb/dwc3/trace.c:11:
include/trace/define_trace.h:95:42: fatal error: ./trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
vim +/dwc3_mask_phy_reset +1459 drivers/usb/dwc3/core.h
1440
1441 #if IS_ENABLED(CONFIG_USB_DWC3_OF_SIMPLE)
1442 int dwc3_enable_hw_coherency(struct device *dev);
1443 void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup);
1444 void dwc3_set_simple_data(struct dwc3 *dwc);
1445 void dwc3_simple_check_quirks(struct dwc3 *dwc);
1446 int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on);
1447 void dwc3_mask_phy_reset(struct device *dev, bool mask);
1448 #else
1449 static inline int dwc3_enable_hw_coherency(struct device *dev)
1450 { return 1; }
1451 void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
1452 { ; }
> 1453 void dwc3_set_simple_data(struct dwc3 *dwc)
1454 { ; }
1455 void dwc3_simple_check_quirks(struct dwc3 *dwc)
1456 { ; }
1457 int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
1458 { ; }
> 1459 void dwc3_mask_phy_reset(struct device *dev, bool mask)
1460 { ; }
1461 #endif
1462
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 217/1768] drivers/media/i2c/adv7511-v4l2.c:427:2: error: void function 'adv7511_set_rgb_quantization_mode' should not return a value
by kernel test robot
Hi Radhey,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 9836a252284b997aacd6b86766514a0bb84b4f43 [217/1768] drivers: media: Customized adv7511 for Xylon LogiCVC (deprecated)
config: x86_64-randconfig-a014-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151136.NxGtCYPb-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/Xilinx/linux-xlnx/commit/9836a252284b997aacd6b86766514...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout 9836a252284b997aacd6b86766514a0bb84b4f43
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/i2c/ drivers/mtd/spi-nor/ drivers/spi/ drivers/usb/host/
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 >>):
>> drivers/media/i2c/adv7511-v4l2.c:427:2: error: void function 'adv7511_set_rgb_quantization_mode' should not return a value [-Wreturn-type]
return 0;
^ ~
drivers/media/i2c/adv7511-v4l2.c:2251:21: warning: no previous prototype for function 'adv7511_subdev' [-Wmissing-prototypes]
struct v4l2_subdev *adv7511_subdev(struct v4l2_subdev *sd)
^
drivers/media/i2c/adv7511-v4l2.c:2251:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct v4l2_subdev *adv7511_subdev(struct v4l2_subdev *sd)
^
static
1 warning and 1 error generated.
vim +/adv7511_set_rgb_quantization_mode +427 drivers/media/i2c/adv7511-v4l2.c
421
422 static void adv7511_set_rgb_quantization_mode(struct v4l2_subdev *sd, struct v4l2_ctrl *ctrl)
423 {
424 struct adv7511_state *state = get_adv7511_state(sd);
425
426 #ifdef XYLON_LOGICVC_INTG
> 427 return 0;
428 #endif
429
430 /* Only makes sense for RGB formats */
431 if (state->fmt_code != MEDIA_BUS_FMT_RGB888_1X24) {
432 /* so just keep quantization */
433 adv7511_csc_rgb_full2limit(sd, false);
434 return;
435 }
436
437 switch (ctrl->val) {
438 case V4L2_DV_RGB_RANGE_AUTO:
439 /* automatic */
440 if (state->dv_timings.bt.flags & V4L2_DV_FL_IS_CE_VIDEO) {
441 /* CE format, RGB limited range (16-235) */
442 adv7511_csc_rgb_full2limit(sd, true);
443 } else {
444 /* not CE format, RGB full range (0-255) */
445 adv7511_csc_rgb_full2limit(sd, false);
446 }
447 break;
448 case V4L2_DV_RGB_RANGE_LIMITED:
449 /* RGB limited range (16-235) */
450 adv7511_csc_rgb_full2limit(sd, true);
451 break;
452 case V4L2_DV_RGB_RANGE_FULL:
453 /* RGB full range (0-255) */
454 adv7511_csc_rgb_full2limit(sd, false);
455 break;
456 }
457 }
458
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 30/1768] drivers/clk/clk-xlnx-clock-wizard.c:120:21: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 0710ed89b3581fd8b7fec134960ccf45664d43ba [30/1768] clk: clock-wizard: Add support for dynamic reconfiguration
config: i386-randconfig-a004-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151040.ptnpLykR-lk...)
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/0710ed89b3581fd8b7fec134960cc...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout 0710ed89b3581fd8b7fec134960ccf45664d43ba
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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/clk/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_recalc_rate':
>> drivers/clk/clk-xlnx-clock-wizard.c:120:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
120 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
>> drivers/clk/clk-xlnx-clock-wizard.c:120:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
120 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
drivers/clk/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_dynamic_reconfig':
drivers/clk/clk-xlnx-clock-wizard.c:139:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
139 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
drivers/clk/clk-xlnx-clock-wizard.c:139:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
139 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
vim +120 drivers/clk/clk-xlnx-clock-wizard.c
114
115 static unsigned long clk_wzrd_recalc_rate(struct clk_hw *hw,
116 unsigned long parent_rate)
117 {
118 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
119 void __iomem *div_addr =
> 120 (void __iomem *)((u64)divider->base + divider->offset);
121 unsigned int val;
122
123 val = readl(div_addr) >> divider->shift;
124 val &= div_mask(divider->width);
125
126 return divider_recalc_rate(hw, parent_rate, val, divider->table,
127 divider->flags, divider->width);
128 }
129
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 05/43] asm: x86: instrument usercopy in get_user() and __put_user_size()
by kernel test robot
Hi Alexander,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/x86/mm]
[also build test WARNING on linus/master v5.16-rc5]
[cannot apply to tip/x86/core hnaz-mm/master next-20211214]
[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/Alexander-Potapenko/Add-KernelMe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745286ac44ee26ed100c2bd2553368ad193b
config: i386-randconfig-s002-20211215 (https://download.01.org/0day-ci/archive/20211215/202112151008.byje9nDq-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/3209eff1f0c7f4de1f9685c4692c7ad79...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemorySanitizer-infrastructure/20211215-003033
git checkout 3209eff1f0c7f4de1f9685c4692c7ad79e8f225b
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/firmware/efi/test/
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/firmware/efi/test/efi_test.c:157:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:157:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:157:13: sparse: got unsigned long *[addressable] data_size
>> drivers/firmware/efi/test/efi_test.c:157:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:157:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:157:13: sparse: got unsigned long *[addressable] data_size
>> drivers/firmware/efi/test/efi_test.c:157:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:157:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:157:13: sparse: got unsigned long *[addressable] data_size
drivers/firmware/efi/test/efi_test.c:160:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct guid_t [usertype] *[addressable] vendor_guid @@
drivers/firmware/efi/test/efi_test.c:160:61: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:160:61: sparse: got struct guid_t [usertype] *[addressable] vendor_guid
drivers/firmware/efi/test/efi_test.c:167:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned short [noderef] [usertype] __user *src @@ got unsigned short [usertype] *[addressable] variable_name @@
drivers/firmware/efi/test/efi_test.c:167:60: sparse: expected unsigned short [noderef] [usertype] __user *src
drivers/firmware/efi/test/efi_test.c:167:60: sparse: got unsigned short [usertype] *[addressable] variable_name
drivers/firmware/efi/test/efi_test.c:187:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:187:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:187:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:187:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:187:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:187:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:194:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:194:35: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:194:35: sparse: got unsigned long *[addressable] data_size
drivers/firmware/efi/test/efi_test.c:194:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:194:35: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:194:35: sparse: got unsigned long *[addressable] data_size
drivers/firmware/efi/test/efi_test.c:209:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got void *[addressable] data @@
drivers/firmware/efi/test/efi_test.c:209:45: sparse: expected void [noderef] __user *to
drivers/firmware/efi/test/efi_test.c:209:45: sparse: got void *[addressable] data
drivers/firmware/efi/test/efi_test.c:215:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int [usertype] *[addressable] attributes @@
drivers/firmware/efi/test/efi_test.c:215:19: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:215:19: sparse: got unsigned int [usertype] *[addressable] attributes
drivers/firmware/efi/test/efi_test.c:215:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned int [usertype] *[addressable] attributes @@
drivers/firmware/efi/test/efi_test.c:215:19: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:215:19: sparse: got unsigned int [usertype] *[addressable] attributes
drivers/firmware/efi/test/efi_test.c:220:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:220:19: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:220:19: sparse: got unsigned long *[addressable] data_size
drivers/firmware/efi/test/efi_test.c:220:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long *[addressable] data_size @@
drivers/firmware/efi/test/efi_test.c:220:19: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:220:19: sparse: got unsigned long *[addressable] data_size
drivers/firmware/efi/test/efi_test.c:243:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct guid_t [usertype] *[addressable] vendor_guid @@
drivers/firmware/efi/test/efi_test.c:243:53: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:243:53: sparse: got struct guid_t [usertype] *[addressable] vendor_guid
drivers/firmware/efi/test/efi_test.c:248:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned short [noderef] [usertype] __user *src @@ got unsigned short [usertype] *[addressable] variable_name @@
drivers/firmware/efi/test/efi_test.c:248:60: sparse: expected unsigned short [noderef] [usertype] __user *src
drivers/firmware/efi/test/efi_test.c:248:60: sparse: got unsigned short [usertype] *[addressable] variable_name
drivers/firmware/efi/test/efi_test.c:253:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user * @@ got void *[addressable] data @@
drivers/firmware/efi/test/efi_test.c:253:39: sparse: expected void const [noderef] __user *
drivers/firmware/efi/test/efi_test.c:253:39: sparse: got void *[addressable] data
drivers/firmware/efi/test/efi_test.c:263:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:263:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:263:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:263:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:263:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:263:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:292:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:292:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:292:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:292:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:292:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:292:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:301:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct efi_time_cap_t [noderef] [usertype] __user *cap_local @@ got struct efi_time_cap_t [usertype] * @@
drivers/firmware/efi/test/efi_test.c:301:27: sparse: expected struct efi_time_cap_t [noderef] [usertype] __user *cap_local
drivers/firmware/efi/test/efi_test.c:301:27: sparse: got struct efi_time_cap_t [usertype] *
drivers/firmware/efi/test/efi_test.c:308:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct efi_time_t [usertype] *[addressable] time @@
drivers/firmware/efi/test/efi_test.c:308:41: sparse: expected void [noderef] __user *to
drivers/firmware/efi/test/efi_test.c:308:41: sparse: got struct efi_time_t [usertype] *[addressable] time
drivers/firmware/efi/test/efi_test.c:325:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct efi_time_t [usertype] *[addressable] time @@
drivers/firmware/efi/test/efi_test.c:325:46: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:325:46: sparse: got struct efi_time_t [usertype] *[addressable] time
drivers/firmware/efi/test/efi_test.c:330:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:330:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:330:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:330:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:330:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:330:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:354:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:354:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:354:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:354:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:354:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:354:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:360:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned char [usertype] *[addressable] enabled @@
drivers/firmware/efi/test/efi_test.c:360:38: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:360:38: sparse: got unsigned char [usertype] *[addressable] enabled
drivers/firmware/efi/test/efi_test.c:360:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned char [usertype] *[addressable] enabled @@
drivers/firmware/efi/test/efi_test.c:360:38: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:360:38: sparse: got unsigned char [usertype] *[addressable] enabled
drivers/firmware/efi/test/efi_test.c:365:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct efi_time_t [usertype] *[addressable] time @@
drivers/firmware/efi/test/efi_test.c:365:47: sparse: expected void [noderef] __user *to
drivers/firmware/efi/test/efi_test.c:365:47: sparse: got struct efi_time_t [usertype] *[addressable] time
drivers/firmware/efi/test/efi_test.c:389:60: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct efi_time_t [usertype] *[addressable] time @@
drivers/firmware/efi/test/efi_test.c:389:60: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:389:60: sparse: got struct efi_time_t [usertype] *[addressable] time
drivers/firmware/efi/test/efi_test.c:397:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:397:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:397:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:397:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:397:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:397:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:421:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:421:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:421:21: sparse: got unsigned long *[addressable] variable_name_size
>> drivers/firmware/efi/test/efi_test.c:421:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:421:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:421:21: sparse: got unsigned long *[addressable] variable_name_size
>> drivers/firmware/efi/test/efi_test.c:421:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:421:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:421:21: sparse: got unsigned long *[addressable] variable_name_size
drivers/firmware/efi/test/efi_test.c:429:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct guid_t [usertype] *[addressable] vendor_guid @@
drivers/firmware/efi/test/efi_test.c:429:52: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:429:52: sparse: got struct guid_t [usertype] *[addressable] vendor_guid
drivers/firmware/efi/test/efi_test.c:439:52: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short [noderef] [usertype] __user *src @@ got unsigned short [usertype] *[addressable] variable_name @@
drivers/firmware/efi/test/efi_test.c:439:52: sparse: expected unsigned short [noderef] [usertype] __user *src
drivers/firmware/efi/test/efi_test.c:439:52: sparse: got unsigned short [usertype] *[addressable] variable_name
drivers/firmware/efi/test/efi_test.c:452:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned short [noderef] [usertype] __user *src @@ got unsigned short [usertype] *[addressable] variable_name @@
drivers/firmware/efi/test/efi_test.c:452:52: sparse: expected unsigned short [noderef] [usertype] __user *src
drivers/firmware/efi/test/efi_test.c:452:52: sparse: got unsigned short [usertype] *[addressable] variable_name
drivers/firmware/efi/test/efi_test.c:461:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:461:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:461:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:461:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:461:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:461:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:468:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:468:35: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:468:35: sparse: got unsigned long *[addressable] variable_name_size
drivers/firmware/efi/test/efi_test.c:468:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:468:35: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:468:35: sparse: got unsigned long *[addressable] variable_name_size
drivers/firmware/efi/test/efi_test.c:479:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short [noderef] [usertype] __user *dst @@ got unsigned short [usertype] *[addressable] variable_name @@
drivers/firmware/efi/test/efi_test.c:479:62: sparse: expected unsigned short [noderef] [usertype] __user *dst
drivers/firmware/efi/test/efi_test.c:479:62: sparse: got unsigned short [usertype] *[addressable] variable_name
drivers/firmware/efi/test/efi_test.c:487:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:487:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:487:21: sparse: got unsigned long *[addressable] variable_name_size
drivers/firmware/efi/test/efi_test.c:487:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long *[addressable] variable_name_size @@
drivers/firmware/efi/test/efi_test.c:487:21: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:487:21: sparse: got unsigned long *[addressable] variable_name_size
drivers/firmware/efi/test/efi_test.c:494:53: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct guid_t [usertype] *[addressable] vendor_guid @@
drivers/firmware/efi/test/efi_test.c:494:53: sparse: expected void [noderef] __user *to
drivers/firmware/efi/test/efi_test.c:494:53: sparse: got struct guid_t [usertype] *[addressable] vendor_guid
drivers/firmware/efi/test/efi_test.c:522:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:522:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:522:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:522:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:522:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:522:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:529:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int [usertype] *[addressable] high_count @@
drivers/firmware/efi/test/efi_test.c:529:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:529:13: sparse: got unsigned int [usertype] *[addressable] high_count
drivers/firmware/efi/test/efi_test.c:529:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned int [usertype] *[addressable] high_count @@
drivers/firmware/efi/test/efi_test.c:529:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:529:13: sparse: got unsigned int [usertype] *[addressable] high_count
drivers/firmware/efi/test/efi_test.c:546:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user * @@ got void * @@
drivers/firmware/efi/test/efi_test.c:546:37: sparse: expected void const [noderef] __user *
drivers/firmware/efi/test/efi_test.c:546:37: sparse: got void *
drivers/firmware/efi/test/efi_test.c:575:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:575:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:575:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:575:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] status @@
drivers/firmware/efi/test/efi_test.c:575:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:575:13: sparse: got unsigned long [usertype] *[addressable] status
drivers/firmware/efi/test/efi_test.c:581:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] *[addressable] maximum_variable_storage_size @@
drivers/firmware/efi/test/efi_test.c:581:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:581:13: sparse: got unsigned long long [usertype] *[addressable] maximum_variable_storage_size
drivers/firmware/efi/test/efi_test.c:581:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long long [usertype] *[addressable] maximum_variable_storage_size @@
drivers/firmware/efi/test/efi_test.c:581:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:581:13: sparse: got unsigned long long [usertype] *[addressable] maximum_variable_storage_size
drivers/firmware/efi/test/efi_test.c:585:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] *[addressable] remaining_variable_storage_size @@
drivers/firmware/efi/test/efi_test.c:585:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:585:13: sparse: got unsigned long long [usertype] *[addressable] remaining_variable_storage_size
drivers/firmware/efi/test/efi_test.c:585:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long long [usertype] *[addressable] remaining_variable_storage_size @@
drivers/firmware/efi/test/efi_test.c:585:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:585:13: sparse: got unsigned long long [usertype] *[addressable] remaining_variable_storage_size
drivers/firmware/efi/test/efi_test.c:589:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] *[addressable] maximum_variable_size @@
drivers/firmware/efi/test/efi_test.c:589:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:589:13: sparse: got unsigned long long [usertype] *[addressable] maximum_variable_size
drivers/firmware/efi/test/efi_test.c:589:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long long [usertype] *[addressable] maximum_variable_size @@
drivers/firmware/efi/test/efi_test.c:589:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:589:13: sparse: got unsigned long long [usertype] *[addressable] maximum_variable_size
drivers/firmware/efi/test/efi_test.c:625:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got struct efi_capsule_header_t [usertype] ** @@
drivers/firmware/efi/test/efi_test.c:625:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:625:21: sparse: got struct efi_capsule_header_t [usertype] **
>> drivers/firmware/efi/test/efi_test.c:625:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct efi_capsule_header_t [usertype] ** @@
drivers/firmware/efi/test/efi_test.c:625:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:625:21: sparse: got struct efi_capsule_header_t [usertype] **
>> drivers/firmware/efi/test/efi_test.c:625:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct efi_capsule_header_t [usertype] ** @@
drivers/firmware/efi/test/efi_test.c:625:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:625:21: sparse: got struct efi_capsule_header_t [usertype] **
>> drivers/firmware/efi/test/efi_test.c:629:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct efi_capsule_header_t [usertype] *[addressable] [assigned] c @@
drivers/firmware/efi/test/efi_test.c:629:50: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:629:50: sparse: got struct efi_capsule_header_t [usertype] *[addressable] [assigned] c
drivers/firmware/efi/test/efi_test.c:643:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long [usertype] *[addressable] [assigned] status @@
drivers/firmware/efi/test/efi_test.c:643:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:643:13: sparse: got unsigned long [usertype] *[addressable] [assigned] status
drivers/firmware/efi/test/efi_test.c:643:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long [usertype] *[addressable] [assigned] status @@
drivers/firmware/efi/test/efi_test.c:643:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:643:13: sparse: got unsigned long [usertype] *[addressable] [assigned] status
drivers/firmware/efi/test/efi_test.c:653:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long long [usertype] *[addressable] [assigned] maximum_capsule_size @@
drivers/firmware/efi/test/efi_test.c:653:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:653:13: sparse: got unsigned long long [usertype] *[addressable] [assigned] maximum_capsule_size
drivers/firmware/efi/test/efi_test.c:653:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got unsigned long long [usertype] *[addressable] [assigned] maximum_capsule_size @@
drivers/firmware/efi/test/efi_test.c:653:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:653:13: sparse: got unsigned long long [usertype] *[addressable] [assigned] maximum_capsule_size
drivers/firmware/efi/test/efi_test.c:658:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int *[addressable] [assigned] reset_type @@
drivers/firmware/efi/test/efi_test.c:658:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:658:13: sparse: got int *[addressable] [assigned] reset_type
drivers/firmware/efi/test/efi_test.c:658:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *__ptr_pu @@ got int *[addressable] [assigned] reset_type @@
drivers/firmware/efi/test/efi_test.c:658:13: sparse: expected void [noderef] __user *__ptr_pu
drivers/firmware/efi/test/efi_test.c:658:13: sparse: got int *[addressable] [assigned] reset_type
drivers/firmware/efi/test/efi_test.c:671:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned int [noderef] __user *supported_mask @@ got unsigned int * @@
drivers/firmware/efi/test/efi_test.c:671:24: sparse: expected unsigned int [noderef] __user *supported_mask
drivers/firmware/efi/test/efi_test.c:671:24: sparse: got unsigned int *
drivers/firmware/efi/test/efi_test.c:35:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short [usertype] *s @@ got unsigned short [noderef] [usertype] __user *str @@
drivers/firmware/efi/test/efi_test.c:35:27: sparse: expected unsigned short [usertype] *s
drivers/firmware/efi/test/efi_test.c:35:27: sparse: got unsigned short [noderef] [usertype] __user *str
drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:35:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short [usertype] *[assigned] s @@ got unsigned short [noderef] [usertype] __user *str @@
drivers/firmware/efi/test/efi_test.c:35:27: sparse: expected unsigned short [usertype] *[assigned] s
drivers/firmware/efi/test/efi_test.c:35:27: sparse: got unsigned short [noderef] [usertype] __user *str
drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:35:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short [usertype] *[assigned] s @@ got unsigned short [noderef] [usertype] __user *str @@
drivers/firmware/efi/test/efi_test.c:35:27: sparse: expected unsigned short [usertype] *[assigned] s
drivers/firmware/efi/test/efi_test.c:35:27: sparse: got unsigned short [noderef] [usertype] __user *str
drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
>> drivers/firmware/efi/test/efi_test.c:44:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:44:13: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:44:13: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
drivers/firmware/efi/test/efi_test.c:50:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned short [usertype] * @@
drivers/firmware/efi/test/efi_test.c:50:21: sparse: expected void const [noderef] __user *from
drivers/firmware/efi/test/efi_test.c:50:21: sparse: got unsigned short [usertype] *
vim +157 drivers/firmware/efi/test/efi_test.c
ff6301dabc3ca20 Ivan Hu 2016-08-25 26
ff6301dabc3ca20 Ivan Hu 2016-08-25 27 /*
ff6301dabc3ca20 Ivan Hu 2016-08-25 28 * Count the bytes in 'str', including the terminating NULL.
ff6301dabc3ca20 Ivan Hu 2016-08-25 29 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 30 * Note this function returns the number of *bytes*, not the number of
ff6301dabc3ca20 Ivan Hu 2016-08-25 31 * ucs2 characters.
ff6301dabc3ca20 Ivan Hu 2016-08-25 32 */
ff6301dabc3ca20 Ivan Hu 2016-08-25 33 static inline size_t user_ucs2_strsize(efi_char16_t __user *str)
ff6301dabc3ca20 Ivan Hu 2016-08-25 34 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 35 efi_char16_t *s = str, c;
ff6301dabc3ca20 Ivan Hu 2016-08-25 36 size_t len;
ff6301dabc3ca20 Ivan Hu 2016-08-25 37
ff6301dabc3ca20 Ivan Hu 2016-08-25 38 if (!str)
ff6301dabc3ca20 Ivan Hu 2016-08-25 39 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 40
ff6301dabc3ca20 Ivan Hu 2016-08-25 41 /* Include terminating NULL */
ff6301dabc3ca20 Ivan Hu 2016-08-25 42 len = sizeof(efi_char16_t);
ff6301dabc3ca20 Ivan Hu 2016-08-25 43
ff6301dabc3ca20 Ivan Hu 2016-08-25 @44 if (get_user(c, s++)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 45 /* Can't read userspace memory for size */
ff6301dabc3ca20 Ivan Hu 2016-08-25 46 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 47 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 48
ff6301dabc3ca20 Ivan Hu 2016-08-25 49 while (c != 0) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 50 if (get_user(c, s++)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 51 /* Can't read userspace memory for size */
ff6301dabc3ca20 Ivan Hu 2016-08-25 52 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 53 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 54 len += sizeof(efi_char16_t);
ff6301dabc3ca20 Ivan Hu 2016-08-25 55 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 56 return len;
ff6301dabc3ca20 Ivan Hu 2016-08-25 57 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 58
ff6301dabc3ca20 Ivan Hu 2016-08-25 59 /*
ff6301dabc3ca20 Ivan Hu 2016-08-25 60 * Allocate a buffer and copy a ucs2 string from user space into it.
ff6301dabc3ca20 Ivan Hu 2016-08-25 61 */
ff6301dabc3ca20 Ivan Hu 2016-08-25 62 static inline int
ff6301dabc3ca20 Ivan Hu 2016-08-25 63 copy_ucs2_from_user_len(efi_char16_t **dst, efi_char16_t __user *src,
ff6301dabc3ca20 Ivan Hu 2016-08-25 64 size_t len)
ff6301dabc3ca20 Ivan Hu 2016-08-25 65 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 66 efi_char16_t *buf;
ff6301dabc3ca20 Ivan Hu 2016-08-25 67
ff6301dabc3ca20 Ivan Hu 2016-08-25 68 if (!src) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 69 *dst = NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 70 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 71 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 72
5f72cad65cfaac5 Geliang Tang 2017-06-02 73 buf = memdup_user(src, len);
5f72cad65cfaac5 Geliang Tang 2017-06-02 74 if (IS_ERR(buf)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 75 *dst = NULL;
5f72cad65cfaac5 Geliang Tang 2017-06-02 76 return PTR_ERR(buf);
ff6301dabc3ca20 Ivan Hu 2016-08-25 77 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 78 *dst = buf;
ff6301dabc3ca20 Ivan Hu 2016-08-25 79
ff6301dabc3ca20 Ivan Hu 2016-08-25 80 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 81 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 82
ff6301dabc3ca20 Ivan Hu 2016-08-25 83 /*
ff6301dabc3ca20 Ivan Hu 2016-08-25 84 * Count the bytes in 'str', including the terminating NULL.
ff6301dabc3ca20 Ivan Hu 2016-08-25 85 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 86 * Just a wrap for user_ucs2_strsize
ff6301dabc3ca20 Ivan Hu 2016-08-25 87 */
ff6301dabc3ca20 Ivan Hu 2016-08-25 88 static inline int
ff6301dabc3ca20 Ivan Hu 2016-08-25 89 get_ucs2_strsize_from_user(efi_char16_t __user *src, size_t *len)
ff6301dabc3ca20 Ivan Hu 2016-08-25 90 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 91 *len = user_ucs2_strsize(src);
ff6301dabc3ca20 Ivan Hu 2016-08-25 92 if (*len == 0)
ff6301dabc3ca20 Ivan Hu 2016-08-25 93 return -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 94
ff6301dabc3ca20 Ivan Hu 2016-08-25 95 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 96 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 97
ff6301dabc3ca20 Ivan Hu 2016-08-25 98 /*
ff6301dabc3ca20 Ivan Hu 2016-08-25 99 * Calculate the required buffer allocation size and copy a ucs2 string
ff6301dabc3ca20 Ivan Hu 2016-08-25 100 * from user space into it.
ff6301dabc3ca20 Ivan Hu 2016-08-25 101 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 102 * This function differs from copy_ucs2_from_user_len() because it
ff6301dabc3ca20 Ivan Hu 2016-08-25 103 * calculates the size of the buffer to allocate by taking the length of
ff6301dabc3ca20 Ivan Hu 2016-08-25 104 * the string 'src'.
ff6301dabc3ca20 Ivan Hu 2016-08-25 105 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 106 * If a non-zero value is returned, the caller MUST NOT access 'dst'.
ff6301dabc3ca20 Ivan Hu 2016-08-25 107 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 108 * It is the caller's responsibility to free 'dst'.
ff6301dabc3ca20 Ivan Hu 2016-08-25 109 */
ff6301dabc3ca20 Ivan Hu 2016-08-25 110 static inline int
ff6301dabc3ca20 Ivan Hu 2016-08-25 111 copy_ucs2_from_user(efi_char16_t **dst, efi_char16_t __user *src)
ff6301dabc3ca20 Ivan Hu 2016-08-25 112 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 113 size_t len;
ff6301dabc3ca20 Ivan Hu 2016-08-25 114
ff6301dabc3ca20 Ivan Hu 2016-08-25 115 len = user_ucs2_strsize(src);
ff6301dabc3ca20 Ivan Hu 2016-08-25 116 if (len == 0)
ff6301dabc3ca20 Ivan Hu 2016-08-25 117 return -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 118 return copy_ucs2_from_user_len(dst, src, len);
ff6301dabc3ca20 Ivan Hu 2016-08-25 119 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 120
ff6301dabc3ca20 Ivan Hu 2016-08-25 121 /*
ff6301dabc3ca20 Ivan Hu 2016-08-25 122 * Copy a ucs2 string to a user buffer.
ff6301dabc3ca20 Ivan Hu 2016-08-25 123 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 124 * This function is a simple wrapper around copy_to_user() that does
ff6301dabc3ca20 Ivan Hu 2016-08-25 125 * nothing if 'src' is NULL, which is useful for reducing the amount of
ff6301dabc3ca20 Ivan Hu 2016-08-25 126 * NULL checking the caller has to do.
ff6301dabc3ca20 Ivan Hu 2016-08-25 127 *
ff6301dabc3ca20 Ivan Hu 2016-08-25 128 * 'len' specifies the number of bytes to copy.
ff6301dabc3ca20 Ivan Hu 2016-08-25 129 */
ff6301dabc3ca20 Ivan Hu 2016-08-25 130 static inline int
ff6301dabc3ca20 Ivan Hu 2016-08-25 131 copy_ucs2_to_user_len(efi_char16_t __user *dst, efi_char16_t *src, size_t len)
ff6301dabc3ca20 Ivan Hu 2016-08-25 132 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 133 if (!src)
ff6301dabc3ca20 Ivan Hu 2016-08-25 134 return 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 135
ff6301dabc3ca20 Ivan Hu 2016-08-25 136 return copy_to_user(dst, src, len);
ff6301dabc3ca20 Ivan Hu 2016-08-25 137 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 138
ff6301dabc3ca20 Ivan Hu 2016-08-25 139 static long efi_runtime_get_variable(unsigned long arg)
ff6301dabc3ca20 Ivan Hu 2016-08-25 140 {
ff6301dabc3ca20 Ivan Hu 2016-08-25 141 struct efi_getvariable __user *getvariable_user;
ff6301dabc3ca20 Ivan Hu 2016-08-25 142 struct efi_getvariable getvariable;
46b9b7135332d1e Ivan Hu 2016-10-18 143 unsigned long datasize = 0, prev_datasize, *dz;
ff6301dabc3ca20 Ivan Hu 2016-08-25 144 efi_guid_t vendor_guid, *vd = NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 145 efi_status_t status;
ff6301dabc3ca20 Ivan Hu 2016-08-25 146 efi_char16_t *name = NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 147 u32 attr, *at;
ff6301dabc3ca20 Ivan Hu 2016-08-25 148 void *data = NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 149 int rv = 0;
ff6301dabc3ca20 Ivan Hu 2016-08-25 150
ff6301dabc3ca20 Ivan Hu 2016-08-25 151 getvariable_user = (struct efi_getvariable __user *)arg;
ff6301dabc3ca20 Ivan Hu 2016-08-25 152
ff6301dabc3ca20 Ivan Hu 2016-08-25 153 if (copy_from_user(&getvariable, getvariable_user,
ff6301dabc3ca20 Ivan Hu 2016-08-25 154 sizeof(getvariable)))
ff6301dabc3ca20 Ivan Hu 2016-08-25 155 return -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 156 if (getvariable.data_size &&
ff6301dabc3ca20 Ivan Hu 2016-08-25 @157 get_user(datasize, getvariable.data_size))
ff6301dabc3ca20 Ivan Hu 2016-08-25 158 return -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 159 if (getvariable.vendor_guid) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 160 if (copy_from_user(&vendor_guid, getvariable.vendor_guid,
ff6301dabc3ca20 Ivan Hu 2016-08-25 161 sizeof(vendor_guid)))
ff6301dabc3ca20 Ivan Hu 2016-08-25 162 return -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 163 vd = &vendor_guid;
ff6301dabc3ca20 Ivan Hu 2016-08-25 164 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 165
ff6301dabc3ca20 Ivan Hu 2016-08-25 166 if (getvariable.variable_name) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 167 rv = copy_ucs2_from_user(&name, getvariable.variable_name);
ff6301dabc3ca20 Ivan Hu 2016-08-25 168 if (rv)
ff6301dabc3ca20 Ivan Hu 2016-08-25 169 return rv;
ff6301dabc3ca20 Ivan Hu 2016-08-25 170 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 171
ff6301dabc3ca20 Ivan Hu 2016-08-25 172 at = getvariable.attributes ? &attr : NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 173 dz = getvariable.data_size ? &datasize : NULL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 174
ff6301dabc3ca20 Ivan Hu 2016-08-25 175 if (getvariable.data_size && getvariable.data) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 176 data = kmalloc(datasize, GFP_KERNEL);
ff6301dabc3ca20 Ivan Hu 2016-08-25 177 if (!data) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 178 kfree(name);
ff6301dabc3ca20 Ivan Hu 2016-08-25 179 return -ENOMEM;
ff6301dabc3ca20 Ivan Hu 2016-08-25 180 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 181 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 182
ff6301dabc3ca20 Ivan Hu 2016-08-25 183 prev_datasize = datasize;
ff6301dabc3ca20 Ivan Hu 2016-08-25 184 status = efi.get_variable(name, vd, at, dz, data);
ff6301dabc3ca20 Ivan Hu 2016-08-25 185 kfree(name);
ff6301dabc3ca20 Ivan Hu 2016-08-25 186
ff6301dabc3ca20 Ivan Hu 2016-08-25 187 if (put_user(status, getvariable.status)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 188 rv = -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 189 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 190 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 191
ff6301dabc3ca20 Ivan Hu 2016-08-25 192 if (status != EFI_SUCCESS) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 193 if (status == EFI_BUFFER_TOO_SMALL) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 194 if (dz && put_user(datasize, getvariable.data_size)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 195 rv = -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 196 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 197 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 198 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 199 rv = -EINVAL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 200 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 201 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 202
ff6301dabc3ca20 Ivan Hu 2016-08-25 203 if (prev_datasize < datasize) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 204 rv = -EINVAL;
ff6301dabc3ca20 Ivan Hu 2016-08-25 205 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 206 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 207
ff6301dabc3ca20 Ivan Hu 2016-08-25 208 if (data) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 209 if (copy_to_user(getvariable.data, data, datasize)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 210 rv = -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 211 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 212 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 213 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 214
ff6301dabc3ca20 Ivan Hu 2016-08-25 215 if (at && put_user(attr, getvariable.attributes)) {
ff6301dabc3ca20 Ivan Hu 2016-08-25 216 rv = -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 217 goto out;
ff6301dabc3ca20 Ivan Hu 2016-08-25 218 }
ff6301dabc3ca20 Ivan Hu 2016-08-25 219
ff6301dabc3ca20 Ivan Hu 2016-08-25 220 if (dz && put_user(datasize, getvariable.data_size))
ff6301dabc3ca20 Ivan Hu 2016-08-25 221 rv = -EFAULT;
ff6301dabc3ca20 Ivan Hu 2016-08-25 222
ff6301dabc3ca20 Ivan Hu 2016-08-25 223 out:
ff6301dabc3ca20 Ivan Hu 2016-08-25 224 kfree(data);
ff6301dabc3ca20 Ivan Hu 2016-08-25 225 return rv;
ff6301dabc3ca20 Ivan Hu 2016-08-25 226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[paulmck-rcu:dev.2021.12.09b 35/37] kernel/rcu/tree.c:4072:23: warning: variable 'lseq' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.12.09b
head: 0f1825f9df5a83cfeca5f1ecce96633223bf78d2
commit: ca34220fecf856ef7521c912a8812f2c1ea53ab3 [35/37] rcu: Rework rcu_barrier() and callback-migration logic
config: nds32-defconfig (https://download.01.org/0day-ci/archive/20211215/202112151008.JsE9k2En-lk...)
compiler: nds32le-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/com...
git remote add paulmck-rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags paulmck-rcu dev.2021.12.09b
git checkout ca34220fecf856ef7521c912a8812f2c1ea53ab3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash kernel/rcu/
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 >>):
kernel/rcu/tree.c: In function 'rcu_barrier':
>> kernel/rcu/tree.c:4072:23: warning: variable 'lseq' set but not used [-Wunused-but-set-variable]
4072 | unsigned long lseq;
| ^~~~
vim +/lseq +4072 kernel/rcu/tree.c
4058
4059 /**
4060 * rcu_barrier - Wait until all in-flight call_rcu() callbacks complete.
4061 *
4062 * Note that this primitive does not necessarily wait for an RCU grace period
4063 * to complete. For example, if there are no RCU callbacks queued anywhere
4064 * in the system, then rcu_barrier() is within its rights to return
4065 * immediately, without waiting for anything, much less an RCU grace period.
4066 */
4067 void rcu_barrier(void)
4068 {
4069 uintptr_t cpu;
4070 unsigned long flags;
4071 unsigned long gseq;
> 4072 unsigned long lseq;
4073 struct rcu_data *rdp;
4074 unsigned long s = rcu_seq_snap(&rcu_state.barrier_sequence);
4075
4076 rcu_barrier_trace(TPS("Begin"), -1, s);
4077
4078 /* Take mutex to serialize concurrent rcu_barrier() requests. */
4079 mutex_lock(&rcu_state.barrier_mutex);
4080
4081 /* Did someone else do our work for us? */
4082 if (rcu_seq_done(&rcu_state.barrier_sequence, s)) {
4083 rcu_barrier_trace(TPS("EarlyExit"), -1, rcu_state.barrier_sequence);
4084 smp_mb(); /* caller's subsequent code after above check. */
4085 mutex_unlock(&rcu_state.barrier_mutex);
4086 return;
4087 }
4088
4089 /* Mark the start of the barrier operation. */
4090 lseq = rcu_state.barrier_sequence;
4091 rcu_seq_start(&rcu_state.barrier_sequence);
4092 gseq = rcu_state.barrier_sequence;
4093 rcu_barrier_trace(TPS("Inc1"), -1, rcu_state.barrier_sequence);
4094
4095 /*
4096 * Initialize the count to two rather than to zero in order
4097 * to avoid a too-soon return to zero in case of an immediate
4098 * invocation of the just-enqueued callback (or preemption of
4099 * this task). Exclude CPU-hotplug operations to ensure that no
4100 * offline non-offloaded CPU has callbacks queued.
4101 */
4102 init_completion(&rcu_state.barrier_completion);
4103 atomic_set(&rcu_state.barrier_cpu_count, 2);
4104 cpus_read_lock();
4105
4106 /*
4107 * Force each CPU with callbacks to register a new callback.
4108 * When that callback is invoked, we will know that all of the
4109 * corresponding CPU's preceding callbacks have been invoked.
4110 */
4111 for_each_possible_cpu(cpu) {
4112 rdp = per_cpu_ptr(&rcu_data, cpu);
4113 retry:
4114 if (READ_ONCE(rdp->barrier_seq_snap) == gseq)
4115 continue;
4116 if (!rcu_segcblist_n_cbs(&rdp->cblist)) {
4117 raw_spin_lock_irqsave(&rdp->barrier_lock, flags);
4118 WRITE_ONCE(rdp->barrier_seq_snap, gseq);
4119 raw_spin_unlock_irqrestore(&rdp->barrier_lock, flags);
4120 rcu_barrier_trace(TPS("NQ"), cpu, rcu_state.barrier_sequence);
4121 continue;
4122 }
4123 if (rcu_rdp_cpu_online(rdp)) {
4124 if (smp_call_function_single(cpu, rcu_barrier_handler, (void *)cpu, 1)) {
4125 schedule_timeout_uninterruptible(1);
4126 goto retry;
4127 }
4128 WARN_ON_ONCE(READ_ONCE(rdp->barrier_seq_snap) != gseq);
4129 rcu_barrier_trace(TPS("OnlineQ"), cpu, rcu_state.barrier_sequence);
4130 continue;
4131 }
4132 if (!rcu_barrier_entrain_if_ofl(rdp)) {
4133 schedule_timeout_uninterruptible(1);
4134 goto retry;
4135 }
4136 WARN_ON_ONCE(READ_ONCE(rdp->barrier_seq_snap) != gseq);
4137 rcu_barrier_trace(TPS("OfflineNoCBQ"), cpu, rcu_state.barrier_sequence);
4138 }
4139 cpus_read_unlock();
4140
4141 /*
4142 * Now that we have an rcu_barrier_callback() callback on each
4143 * CPU, and thus each counted, remove the initial count.
4144 */
4145 if (atomic_sub_and_test(2, &rcu_state.barrier_cpu_count))
4146 complete(&rcu_state.barrier_completion);
4147
4148 /* Wait for all rcu_barrier_callback() callbacks to be invoked. */
4149 wait_for_completion(&rcu_state.barrier_completion);
4150
4151 /* Mark the end of the barrier operation. */
4152 rcu_barrier_trace(TPS("Inc2"), -1, rcu_state.barrier_sequence);
4153 rcu_seq_end(&rcu_state.barrier_sequence);
4154 gseq = rcu_state.barrier_sequence;
4155 for_each_possible_cpu(cpu) {
4156 rdp = per_cpu_ptr(&rcu_data, cpu);
4157
4158 WRITE_ONCE(rdp->barrier_seq_snap, gseq);
4159 }
4160
4161 /* Other rcu_barrier() invocations can now safely proceed. */
4162 mutex_unlock(&rcu_state.barrier_mutex);
4163 }
4164 EXPORT_SYMBOL_GPL(rcu_barrier);
4165
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week