[intel-lts:5.4/preempt-rt 10119/19034] drivers/misc/xlink-usb/local_host/mxlk_interface.c:110:20: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'int'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head: 2dc0f2c1ee89b9ce92944e397f2619062ebb77f8
commit: 5e9e6d86fe729cf81e8a0df5c53d326b9f2ec791 [10119/19034] xlink-usb: XLink USB Remote and Local Host driver
config: arm-randconfig-r035-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel/linux-intel-lts/commit/5e9e6d86fe729cf81e8a0df5c...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/preempt-rt
git checkout 5e9e6d86fe729cf81e8a0df5c53d326b9f2ec791
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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/misc/xlink-usb/local_host/mxlk_interface.c:110:20: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'int' [-Wint-conversion]
return vpu_close1(data);
^~~~
drivers/misc/xlink-usb/local_host/u_xlink.h:75:20: note: passing argument to parameter 'size' here
int vpu_close1(int size);
^
1 warning generated.
--
drivers/misc/xlink-usb/local_host/u_xlink.c:297:9: warning: variable 'disconnect' set but not used [-Wunused-but-set-variable]
bool disconnect = false;
^
>> drivers/misc/xlink-usb/local_host/u_xlink.c:820:16: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
unsigned long flags;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:823:7: warning: variable 'room' set but not used [-Wunused-but-set-variable]
int room = 0;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:840:9: warning: variable 'do_tty_wake' set but not used [-Wunused-but-set-variable]
bool do_tty_wake = false;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:976:10: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
size_t bcopy;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:970:20: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct list_head *pool = &port->read_pool;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:992:20: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct list_head *pool = &port->read_pool;
^
>> drivers/misc/xlink-usb/local_host/u_xlink.c:996:9: warning: variable 'BUF4' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (!list_empty(pool)) {
^~~~~~~~~~~~~~~~~
drivers/misc/xlink-usb/local_host/u_xlink.c:1002:9: note: uninitialized use occurs here
return BUF4;
^~~~
drivers/misc/xlink-usb/local_host/u_xlink.c:996:9: note: remove the condition if it is always true
while (!list_empty(pool)) {
^~~~~~~~~~~~~~~~~
1
drivers/misc/xlink-usb/local_host/u_xlink.c:993:11: note: initialize the variable 'BUF4' to silence this warning
int *BUF4;
^
= NULL
8 warnings generated.
/tmp/u_xlink-7c9fca.s: Assembler messages:
/tmp/u_xlink-7c9fca.s:204: Error: selected processor does not support `ldrh r0,[r5,#26]' in ARM mode
/tmp/u_xlink-7c9fca.s:356: Error: selected processor does not support `ldrh r1,[r8]' in ARM mode
/tmp/u_xlink-7c9fca.s:483: Error: selected processor does not support `ldrh r1,[r9]' in ARM mode
/tmp/u_xlink-7c9fca.s:554: Error: selected processor does not support `ldrh r1,[r0]' in ARM mode
/tmp/u_xlink-7c9fca.s:1222: Error: selected processor does not support `ldrh r7,[r0]' in ARM mode
/tmp/u_xlink-7c9fca.s:1424: Error: selected processor does not support `ldrh r8,[r0]' in ARM mode
/tmp/u_xlink-7c9fca.s:2480: Error: selected processor does not support `strh r0,[sp,#4]' in ARM mode
/tmp/u_xlink-7c9fca.s:2687: Error: selected processor does not support `ldrh r0,[r6,r0]' in ARM mode
/tmp/u_xlink-7c9fca.s:2688: Error: selected processor does not support `strh r0,[r4,#124]' in ARM mode
/tmp/u_xlink-7c9fca.s:2739: Error: selected processor does not support `ldrh r0,[r11,#124]' in ARM mode
/tmp/u_xlink-7c9fca.s:2742: Error: selected processor does not support `strh r0,[r10,r1]' in ARM mode
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
--
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:349:5: warning: no previous prototype for function 'mxlk_trigger_reset' [-Wmissing-prototypes]
int mxlk_trigger_reset(void *arg)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:349:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mxlk_trigger_reset(void *arg)
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:358:28: warning: variable 'data' is uninitialized when used within its own initialization [-Wuninitialized]
int *data = vpu_read_swid(data);
~~~~ ^~~~
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:377:5: warning: no previous prototype for function 'vpu_setup' [-Wmissing-prototypes]
int vpu_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:377:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:525:5: warning: no previous prototype for function 'vpu_cdc_notify' [-Wmissing-prototypes]
int vpu_cdc_notify(struct f_acm *acm, u8 type, u16 value,
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_cdc_notify(struct f_acm *acm, u8 type, u16 value,
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:562:5: warning: no previous prototype for function 'vpu_notify_serial_state' [-Wmissing-prototypes]
int vpu_notify_serial_state(struct f_acm *acm)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:562:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_notify_serial_state(struct f_acm *acm)
^
static
5 warnings generated.
/tmp/f_vpuusb-c945b5.s: Assembler messages:
/tmp/f_vpuusb-c945b5.s:206: Error: selected processor does not support `strh r4,[r5,#204]' in ARM mode
/tmp/f_vpuusb-c945b5.s:403: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:411: Error: selected processor does not support `ldrh r0,[r5,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:413: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:697: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:700: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:703: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:711: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:713: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:747: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:750: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:753: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:761: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:763: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:800: Error: selected processor does not support `ldrh r7,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:807: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:811: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:819: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:821: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:1399: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-c945b5.s:1407: Error: selected processor does not support `ldrh r0,[r5,#206]' in ARM mode
/tmp/f_vpuusb-c945b5.s:1409: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
--
drivers/misc/xlink-usb/local_host/u_xlink.c:297:9: warning: variable 'disconnect' set but not used [-Wunused-but-set-variable]
bool disconnect = false;
^
>> drivers/misc/xlink-usb/local_host/u_xlink.c:820:16: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
unsigned long flags;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:840:9: warning: variable 'do_tty_wake' set but not used [-Wunused-but-set-variable]
bool do_tty_wake = false;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:823:7: warning: variable 'room' set but not used [-Wunused-but-set-variable]
int room = 0;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:976:10: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
size_t bcopy;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:970:20: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct list_head *pool = &port->read_pool;
^
drivers/misc/xlink-usb/local_host/u_xlink.c:992:20: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct list_head *pool = &port->read_pool;
^
>> drivers/misc/xlink-usb/local_host/u_xlink.c:996:9: warning: variable 'BUF4' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (!list_empty(pool)) {
^~~~~~~~~~~~~~~~~
drivers/misc/xlink-usb/local_host/u_xlink.c:1002:9: note: uninitialized use occurs here
return BUF4;
^~~~
drivers/misc/xlink-usb/local_host/u_xlink.c:996:9: note: remove the condition if it is always true
while (!list_empty(pool)) {
^~~~~~~~~~~~~~~~~
1
drivers/misc/xlink-usb/local_host/u_xlink.c:993:11: note: initialize the variable 'BUF4' to silence this warning
int *BUF4;
^
= NULL
8 warnings generated.
/tmp/u_xlink-82706e.s: Assembler messages:
/tmp/u_xlink-82706e.s:204: Error: selected processor does not support `ldrh r0,[r5,#26]' in ARM mode
/tmp/u_xlink-82706e.s:356: Error: selected processor does not support `ldrh r1,[r8]' in ARM mode
/tmp/u_xlink-82706e.s:483: Error: selected processor does not support `ldrh r1,[r9]' in ARM mode
/tmp/u_xlink-82706e.s:554: Error: selected processor does not support `ldrh r1,[r0]' in ARM mode
/tmp/u_xlink-82706e.s:1222: Error: selected processor does not support `ldrh r7,[r0]' in ARM mode
/tmp/u_xlink-82706e.s:1424: Error: selected processor does not support `ldrh r8,[r0]' in ARM mode
/tmp/u_xlink-82706e.s:2480: Error: selected processor does not support `strh r0,[sp,#4]' in ARM mode
/tmp/u_xlink-82706e.s:2687: Error: selected processor does not support `ldrh r0,[r6,r0]' in ARM mode
/tmp/u_xlink-82706e.s:2688: Error: selected processor does not support `strh r0,[r4,#124]' in ARM mode
/tmp/u_xlink-82706e.s:2739: Error: selected processor does not support `ldrh r0,[r11,#124]' in ARM mode
/tmp/u_xlink-82706e.s:2742: Error: selected processor does not support `strh r0,[r10,r1]' in ARM mode
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
--
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:349:5: warning: no previous prototype for function 'mxlk_trigger_reset' [-Wmissing-prototypes]
int mxlk_trigger_reset(void *arg)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:349:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mxlk_trigger_reset(void *arg)
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:358:28: warning: variable 'data' is uninitialized when used within its own initialization [-Wuninitialized]
int *data = vpu_read_swid(data);
~~~~ ^~~~
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:377:5: warning: no previous prototype for function 'vpu_setup' [-Wmissing-prototypes]
int vpu_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:377:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:525:5: warning: no previous prototype for function 'vpu_cdc_notify' [-Wmissing-prototypes]
int vpu_cdc_notify(struct f_acm *acm, u8 type, u16 value,
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_cdc_notify(struct f_acm *acm, u8 type, u16 value,
^
static
>> drivers/misc/xlink-usb/local_host/f_vpuusb.c:562:5: warning: no previous prototype for function 'vpu_notify_serial_state' [-Wmissing-prototypes]
int vpu_notify_serial_state(struct f_acm *acm)
^
drivers/misc/xlink-usb/local_host/f_vpuusb.c:562:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpu_notify_serial_state(struct f_acm *acm)
^
static
5 warnings generated.
/tmp/f_vpuusb-af89c6.s: Assembler messages:
/tmp/f_vpuusb-af89c6.s:206: Error: selected processor does not support `strh r4,[r5,#204]' in ARM mode
/tmp/f_vpuusb-af89c6.s:403: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:411: Error: selected processor does not support `ldrh r0,[r5,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:413: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:697: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:700: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:703: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:711: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:713: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:747: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:750: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:753: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:761: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:763: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:800: Error: selected processor does not support `ldrh r7,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:807: Error: selected processor does not support `strh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:811: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:819: Error: selected processor does not support `ldrh r0,[r4,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:821: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:1399: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
/tmp/f_vpuusb-af89c6.s:1407: Error: selected processor does not support `ldrh r0,[r5,#206]' in ARM mode
/tmp/f_vpuusb-af89c6.s:1409: Error: selected processor does not support `strh r0,[sp,#6]' in ARM mode
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
vim +110 drivers/misc/xlink-usb/local_host/mxlk_interface.c
97
98 int xlink_usb_write(uint32_t sw_device_id, void *data, size_t *const size,
99 uint32_t timeout)
100 {
101 int mxlk;
102 int rc;
103
104 mxlk = usb_get_by_id(sw_device_id);
105 if (!mxlk)
106 return -ENODEV;
107 rc = vpu_write1(data, size, timeout);
108 if (rc < 0)
109 return rc;
> 110 return vpu_close1(data);
111 }
112 EXPORT_SYMBOL(xlink_usb_write);
113
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[intel-lts:5.4/yocto 10445/18524] drivers/dma/dmaengine.c:603:18: warning: no previous prototype for function 'dma_get_slave_channel'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 8246417e2e14117a0a9f3625c2122fc26c92c6bd
commit: de9c6920ba5aa70a57dfe39b7f99a9e287ac4c50 [10445/18524] dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h
config: x86_64-randconfig-a014-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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/intel/linux-intel-lts/commit/de9c6920ba5aa70a57dfe39b7...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout de9c6920ba5aa70a57dfe39b7f99a9e287ac4c50
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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>
All warnings (new ones prefixed by >>):
>> drivers/dma/dmaengine.c:603:18: warning: no previous prototype for function 'dma_get_slave_channel' [-Wmissing-prototypes]
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
^
drivers/dma/dmaengine.c:603:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
^
static
>> drivers/dma/dmaengine.c:634:18: warning: no previous prototype for function 'dma_get_any_slave_channel' [-Wmissing-prototypes]
struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
^
drivers/dma/dmaengine.c:634:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
^
static
2 warnings generated.
vim +/dma_get_slave_channel +603 drivers/dma/dmaengine.c
7bd903c5ca47fd Peter Ujfalusi 2015-12-14 598
59b5ec21446b92 Dan Williams 2009-01-06 599 /**
19d643d68bd678 Stefan Agner 2015-06-01 600 * dma_get_slave_channel - try to get specific channel exclusively
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 601 * @chan: target channel
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 602 */
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 @603 struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 604 {
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 605 int err = -EBUSY;
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 606
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 607 /* lock against __dma_request_channel */
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 608 mutex_lock(&dma_list_mutex);
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 609
d9a6c8f52d1039 Vinod Koul 2013-08-19 610 if (chan->client_count == 0) {
214fc4e423ff38 Peter Ujfalusi 2015-09-24 611 struct dma_device *device = chan->device;
214fc4e423ff38 Peter Ujfalusi 2015-09-24 612
214fc4e423ff38 Peter Ujfalusi 2015-09-24 613 dma_cap_set(DMA_PRIVATE, device->cap_mask);
214fc4e423ff38 Peter Ujfalusi 2015-09-24 614 device->privatecnt++;
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 615 err = dma_chan_get(chan);
214fc4e423ff38 Peter Ujfalusi 2015-09-24 616 if (err) {
ef859312c3a16b Jarkko Nikula 2016-03-14 617 dev_dbg(chan->device->dev,
ef859312c3a16b Jarkko Nikula 2016-03-14 618 "%s: failed to get %s: (%d)\n",
d9a6c8f52d1039 Vinod Koul 2013-08-19 619 __func__, dma_chan_name(chan), err);
214fc4e423ff38 Peter Ujfalusi 2015-09-24 620 chan = NULL;
214fc4e423ff38 Peter Ujfalusi 2015-09-24 621 if (--device->privatecnt == 0)
214fc4e423ff38 Peter Ujfalusi 2015-09-24 622 dma_cap_clear(DMA_PRIVATE, device->cap_mask);
214fc4e423ff38 Peter Ujfalusi 2015-09-24 623 }
d9a6c8f52d1039 Vinod Koul 2013-08-19 624 } else
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 625 chan = NULL;
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 626
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 627 mutex_unlock(&dma_list_mutex);
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 628
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 629
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 630 return chan;
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 631 }
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 632 EXPORT_SYMBOL_GPL(dma_get_slave_channel);
7bb587f4eef8f7 Zhangfei Gao 2013-06-28 633
8010dad55a0ab0 Stephen Warren 2013-11-26 @634 struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
8010dad55a0ab0 Stephen Warren 2013-11-26 635 {
8010dad55a0ab0 Stephen Warren 2013-11-26 636 dma_cap_mask_t mask;
8010dad55a0ab0 Stephen Warren 2013-11-26 637 struct dma_chan *chan;
8010dad55a0ab0 Stephen Warren 2013-11-26 638
8010dad55a0ab0 Stephen Warren 2013-11-26 639 dma_cap_zero(mask);
8010dad55a0ab0 Stephen Warren 2013-11-26 640 dma_cap_set(DMA_SLAVE, mask);
8010dad55a0ab0 Stephen Warren 2013-11-26 641
8010dad55a0ab0 Stephen Warren 2013-11-26 642 /* lock against __dma_request_channel */
8010dad55a0ab0 Stephen Warren 2013-11-26 643 mutex_lock(&dma_list_mutex);
8010dad55a0ab0 Stephen Warren 2013-11-26 644
7bd903c5ca47fd Peter Ujfalusi 2015-12-14 645 chan = find_candidate(device, &mask, NULL, NULL);
8010dad55a0ab0 Stephen Warren 2013-11-26 646
8010dad55a0ab0 Stephen Warren 2013-11-26 647 mutex_unlock(&dma_list_mutex);
8010dad55a0ab0 Stephen Warren 2013-11-26 648
7bd903c5ca47fd Peter Ujfalusi 2015-12-14 649 return IS_ERR(chan) ? NULL : chan;
8010dad55a0ab0 Stephen Warren 2013-11-26 650 }
8010dad55a0ab0 Stephen Warren 2013-11-26 651 EXPORT_SYMBOL_GPL(dma_get_any_slave_channel);
8010dad55a0ab0 Stephen Warren 2013-11-26 652
:::::: The code at line 603 was first introduced by commit
:::::: 7bb587f4eef8f71ce589f360ab99bb54ab0fc85d dmaengine: add interface of dma_get_slave_channel
:::::: TO: Zhangfei Gao <zhangfei.gao(a)linaro.org>
:::::: CC: Vinod Koul <vinod.koul(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[l1k:bcm2835_spi_clkcache 1/1] drivers/spi/spi-bcm2835.c:1048:6: error: no previous prototype for 'bcm2835_spi_set_clk'
by kernel test robot
tree: https://github.com/l1k/linux bcm2835_spi_clkcache
head: e46f7c6c25bbb03644fd48964df89fa755e0778b
commit: e46f7c6c25bbb03644fd48964df89fa755e0778b [1/1] spi: bcm2835: Avoid unnecessary recalculation of CLK register
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/l1k/linux/commit/e46f7c6c25bbb03644fd48964df89fa755e0778b
git remote add l1k https://github.com/l1k/linux
git fetch --no-tags l1k bcm2835_spi_clkcache
git checkout e46f7c6c25bbb03644fd48964df89fa755e0778b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 errors (new ones prefixed by >>):
>> drivers/spi/spi-bcm2835.c:1048:6: error: no previous prototype for 'bcm2835_spi_set_clk' [-Werror=missing-prototypes]
1048 | void bcm2835_spi_set_clk(struct bcm2835_spi *bs, struct spi_transfer *tfr)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/bcm2835_spi_set_clk +1048 drivers/spi/spi-bcm2835.c
1047
> 1048 void bcm2835_spi_set_clk(struct bcm2835_spi *bs, struct spi_transfer *tfr)
1049 {
1050 unsigned long spi_hz = bs->speed_hz = tfr->speed_hz;
1051 unsigned long cdiv;
1052
1053 if (spi_hz >= bs->clk_hz / 2) {
1054 cdiv = 2; /* clk_hz/2 is the fastest we can go */
1055 } else if (spi_hz) {
1056 /* CDIV must be a multiple of two */
1057 cdiv = DIV_ROUND_UP(bs->clk_hz, spi_hz);
1058 cdiv += (cdiv % 2);
1059
1060 if (cdiv >= 65536)
1061 cdiv = 0; /* 0 is the slowest we can go */
1062 } else {
1063 cdiv = 0; /* 0 is the slowest we can go */
1064 }
1065
1066 tfr->effective_speed_hz = bs->effective_speed_hz =
1067 cdiv ? (bs->clk_hz / cdiv) : (bs->clk_hz / 65536);
1068
1069 bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv);
1070 }
1071
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[dhowells-fs:swap-dio 2/9] fs/affs/file.c:463:9: error: request for member 'supports' in something not a structure or union
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git swap-dio
head: a65f2f4fe575e2069276795af46f962dd4559edf
commit: b52bb021e191a322c2ade3a5f83e658932bef2bf [2/9] mm: Add 'supports' field to the address_space_operations to list features
config: s390-allyesconfig (attached as .config)
compiler: s390-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/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs swap-dio
git checkout b52bb021e191a322c2ade3a5f83e658932bef2bf
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 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 >>):
>> fs/affs/file.c:463:9: error: request for member 'supports' in something not a structure or union
463 | .supports = AS_SUPPORTS_DIRECT_IO,
| ^
vim +/supports +463 fs/affs/file.c
454
455 const struct address_space_operations affs_aops = {
456 .set_page_dirty = __set_page_dirty_buffers,
457 .readpage = affs_readpage,
458 .writepage = affs_writepage,
459 .write_begin = affs_write_begin,
460 .write_end = affs_write_end,
461 .direct_IO = affs_direct_IO,
462 .bmap = _affs_bmap
> 463 .supports = AS_SUPPORTS_DIRECT_IO,
464 };
465
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[xilinx-xlnx:xlnx_rebase_v5.10 223/1964] drivers/media/i2c/adv7511-v4l2.c:2251:21: warning: no previous prototype for 'adv7511_subdev'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: 0a6e9d56f285540e5ca6c69c7fad2c3520b79c50
commit: c879ca1c486ba6c809ca48c82c0c8a289d97ce15 [223/1964] drivers: media: Customized adv7511 for Xylon LogiCVC (deprecated)
config: openrisc-randconfig-r023-20210930 (attached as .config)
compiler: or1k-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/c879ca1c486ba6c809ca48c82c0c8...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
git checkout c879ca1c486ba6c809ca48c82c0c8a289d97ce15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc
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/media/i2c/adv7511-v4l2.c: In function 'adv7511_set_rgb_quantization_mode':
drivers/media/i2c/adv7511-v4l2.c:427:16: error: 'return' with a value, in function returning void [-Werror=return-type]
427 | return 0;
| ^
drivers/media/i2c/adv7511-v4l2.c:422:13: note: declared here
422 | static void adv7511_set_rgb_quantization_mode(struct v4l2_subdev *sd, struct v4l2_ctrl *ctrl)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7511-v4l2.c: At top level:
>> drivers/media/i2c/adv7511-v4l2.c:2251:21: warning: no previous prototype for 'adv7511_subdev' [-Wmissing-prototypes]
2251 | struct v4l2_subdev *adv7511_subdev(struct v4l2_subdev *sd)
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/adv7511_subdev +2251 drivers/media/i2c/adv7511-v4l2.c
2250
> 2251 struct v4l2_subdev *adv7511_subdev(struct v4l2_subdev *sd)
2252 {
2253 static struct v4l2_subdev *subdev;
2254
2255 if (sd)
2256 subdev = sd;
2257
2258 return subdev;
2259 }
2260 EXPORT_SYMBOL(adv7511_subdev);
2261
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[gustavoars:for-next/cast-function 1/1] kernel/bpf/verifier.c:12470:16: warning: cast from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long,...
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/cast-function
head: ffea83dd8823401f3922276d36aca35c3e99d7f3
commit: ffea83dd8823401f3922276d36aca35c3e99d7f3 [1/1] Makefile: Enable -Wcast-function-type
config: i386-randconfig-r016-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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/gustavoars/linux.git/comm...
git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
git fetch --no-tags gustavoars for-next/cast-function
git checkout ffea83dd8823401f3922276d36aca35c3e99d7f3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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/bpf/verifier.c:12470:16: warning: cast from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/verifier.c:12951:17: warning: cast from 'void *(*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/verifier.c:12955:17: warning: cast from 'int (*)(struct bpf_map *, void *, void *, u64)' (aka 'int (*)(struct bpf_map *, void *, void *, unsigned long long)') to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/verifier.c:12959:17: warning: cast from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/verifier.c:12963:17: warning: cast from 'int (*)(struct bpf_map *, void *, u64)' (aka 'int (*)(struct bpf_map *, void *, unsigned long long)') to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:12967:17: warning: cast from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:12971:17: warning: cast from 'int (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/verifier.c:12975:17: warning: cast from 'int (*)(struct bpf_map *, u32, u64)' (aka 'int (*)(struct bpf_map *, unsigned int, unsigned long long)') to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
insn->imm = BPF_CAST_CALL(ops->map_redirect) -
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 warnings generated.
--
>> kernel/bpf/hashtab.c:671:26: warning: cast from 'void *(*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
*insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^
include/linux/filter.h:374:14: note: expanded from macro 'BPF_EMIT_CALL'
.imm = ((FUNC) - __bpf_call_base) })
^~~~
kernel/bpf/hashtab.c:712:26: warning: cast from 'void *(*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
*insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^
include/linux/filter.h:374:14: note: expanded from macro 'BPF_EMIT_CALL'
.imm = ((FUNC) - __bpf_call_base) })
^~~~
kernel/bpf/hashtab.c:2400:26: warning: cast from 'void *(*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' (aka 'unsigned long long (*)(unsigned long long, unsigned long long, unsigned long long, unsigned long long, unsigned long long)') converts to incompatible function type [-Wcast-function-type]
*insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/filter.h:366:4: note: expanded from macro 'BPF_CAST_CALL'
((u64 (*)(u64, u64, u64, u64, u64))(x))
^
include/linux/filter.h:374:14: note: expanded from macro 'BPF_EMIT_CALL'
.imm = ((FUNC) - __bpf_call_base) })
^~~~
3 warnings generated.
--
>> drivers/firewire/core-cdev.c:985:8: warning: cast from 'void (*)(struct fw_iso_context *, dma_addr_t, void *)' (aka 'void (*)(struct fw_iso_context *, unsigned int, void *)') to 'fw_iso_callback_t' (aka 'void (*)(struct fw_iso_context *, unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Wcast-function-type]
cb = (fw_iso_callback_t)iso_mc_callback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +12470 kernel/bpf/verifier.c
9bac3d6d548e5c Alexei Starovoitov 2015-03-13 12337
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12338 static int jit_subprogs(struct bpf_verifier_env *env)
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12339 {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12340 struct bpf_prog *prog = env->prog, **func, *tmp;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12341 int i, j, subprog_start, subprog_end = 0, len, subprog;
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12342 struct bpf_map *map_ptr;
7105e828c087de Daniel Borkmann 2017-12-20 12343 struct bpf_insn *insn;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12344 void *old_bpf_func;
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12345 int err, num_exentries;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12346
f910cefa32b6cd Jiong Wang 2018-05-02 12347 if (env->subprog_cnt <= 1)
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12348 return 0;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12349
7105e828c087de Daniel Borkmann 2017-12-20 12350 for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) {
69c087ba6225b5 Yonghong Song 2021-02-26 12351 if (bpf_pseudo_func(insn)) {
69c087ba6225b5 Yonghong Song 2021-02-26 12352 env->insn_aux_data[i].call_imm = insn->imm;
69c087ba6225b5 Yonghong Song 2021-02-26 12353 /* subprog is encoded in insn[1].imm */
69c087ba6225b5 Yonghong Song 2021-02-26 12354 continue;
69c087ba6225b5 Yonghong Song 2021-02-26 12355 }
69c087ba6225b5 Yonghong Song 2021-02-26 12356
23a2d70c7a2f28 Yonghong Song 2021-02-04 12357 if (!bpf_pseudo_call(insn))
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12358 continue;
c7a897843224a9 Daniel Borkmann 2018-07-12 12359 /* Upon error here we cannot fall back to interpreter but
c7a897843224a9 Daniel Borkmann 2018-07-12 12360 * need a hard reject of the program. Thus -EFAULT is
c7a897843224a9 Daniel Borkmann 2018-07-12 12361 * propagated in any case.
c7a897843224a9 Daniel Borkmann 2018-07-12 12362 */
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12363 subprog = find_subprog(env, i + insn->imm + 1);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12364 if (subprog < 0) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12365 WARN_ONCE(1, "verifier bug. No program starts at insn %d\n",
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12366 i + insn->imm + 1);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12367 return -EFAULT;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12368 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12369 /* temporarily remember subprog id inside insn instead of
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12370 * aux_data, since next loop will split up all insns into funcs
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12371 */
f910cefa32b6cd Jiong Wang 2018-05-02 12372 insn->off = subprog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12373 /* remember original imm in case JIT fails and fallback
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12374 * to interpreter will be needed
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12375 */
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12376 env->insn_aux_data[i].call_imm = insn->imm;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12377 /* point imm to __bpf_call_base+1 from JITs point of view */
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12378 insn->imm = 1;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12379 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12380
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12381 err = bpf_prog_alloc_jited_linfo(prog);
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12382 if (err)
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12383 goto out_undo_insn;
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12384
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12385 err = -ENOMEM;
6396bb221514d2 Kees Cook 2018-06-12 12386 func = kcalloc(env->subprog_cnt, sizeof(prog), GFP_KERNEL);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12387 if (!func)
c7a897843224a9 Daniel Borkmann 2018-07-12 12388 goto out_undo_insn;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12389
f910cefa32b6cd Jiong Wang 2018-05-02 12390 for (i = 0; i < env->subprog_cnt; i++) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12391 subprog_start = subprog_end;
9c8105bd440223 Jiong Wang 2018-05-02 12392 subprog_end = env->subprog_info[i + 1].start;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12393
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12394 len = subprog_end - subprog_start;
fb7dd8bca0139f Andrii Nakryiko 2021-08-15 12395 /* bpf_prog_run() doesn't call subprogs directly,
492ecee892c2a4 Alexei Starovoitov 2019-02-25 12396 * hence main prog stats include the runtime of subprogs.
492ecee892c2a4 Alexei Starovoitov 2019-02-25 12397 * subprogs don't have IDs and not reachable via prog_get_next_id
700d4796ef59f5 Alexei Starovoitov 2021-02-09 12398 * func[i]->stats will never be accessed and stays NULL
492ecee892c2a4 Alexei Starovoitov 2019-02-25 12399 */
492ecee892c2a4 Alexei Starovoitov 2019-02-25 12400 func[i] = bpf_prog_alloc_no_stats(bpf_prog_size(len), GFP_USER);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12401 if (!func[i])
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12402 goto out_free;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12403 memcpy(func[i]->insnsi, &prog->insnsi[subprog_start],
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12404 len * sizeof(struct bpf_insn));
4f74d80971bce9 Daniel Borkmann 2017-12-20 12405 func[i]->type = prog->type;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12406 func[i]->len = len;
4f74d80971bce9 Daniel Borkmann 2017-12-20 12407 if (bpf_prog_calc_tag(func[i]))
4f74d80971bce9 Daniel Borkmann 2017-12-20 12408 goto out_free;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12409 func[i]->is_func = 1;
ba64e7d8525236 Yonghong Song 2018-11-24 12410 func[i]->aux->func_idx = i;
f263a81451c12d John Fastabend 2021-07-07 12411 /* Below members will be freed only at prog->aux */
ba64e7d8525236 Yonghong Song 2018-11-24 12412 func[i]->aux->btf = prog->aux->btf;
ba64e7d8525236 Yonghong Song 2018-11-24 12413 func[i]->aux->func_info = prog->aux->func_info;
f263a81451c12d John Fastabend 2021-07-07 12414 func[i]->aux->poke_tab = prog->aux->poke_tab;
f263a81451c12d John Fastabend 2021-07-07 12415 func[i]->aux->size_poke_tab = prog->aux->size_poke_tab;
ba64e7d8525236 Yonghong Song 2018-11-24 12416
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12417 for (j = 0; j < prog->aux->size_poke_tab; j++) {
f263a81451c12d John Fastabend 2021-07-07 12418 struct bpf_jit_poke_descriptor *poke;
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12419
f263a81451c12d John Fastabend 2021-07-07 12420 poke = &prog->aux->poke_tab[j];
f263a81451c12d John Fastabend 2021-07-07 12421 if (poke->insn_idx < subprog_end &&
f263a81451c12d John Fastabend 2021-07-07 12422 poke->insn_idx >= subprog_start)
f263a81451c12d John Fastabend 2021-07-07 12423 poke->aux = func[i]->aux;
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12424 }
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12425
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12426 /* Use bpf_prog_F_tag to indicate functions in stack traces.
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12427 * Long term would need debug info to populate names
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12428 */
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12429 func[i]->aux->name[0] = 'F';
9c8105bd440223 Jiong Wang 2018-05-02 12430 func[i]->aux->stack_depth = env->subprog_info[i].stack_depth;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12431 func[i]->jit_requested = 1;
e6ac2450d6dee3 Martin KaFai Lau 2021-03-24 12432 func[i]->aux->kfunc_tab = prog->aux->kfunc_tab;
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12433 func[i]->aux->linfo = prog->aux->linfo;
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12434 func[i]->aux->nr_linfo = prog->aux->nr_linfo;
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12435 func[i]->aux->jited_linfo = prog->aux->jited_linfo;
c454a46b5efd8e Martin KaFai Lau 2018-12-07 12436 func[i]->aux->linfo_idx = env->subprog_info[i].linfo_idx;
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12437 num_exentries = 0;
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12438 insn = func[i]->insnsi;
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12439 for (j = 0; j < func[i]->len; j++, insn++) {
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12440 if (BPF_CLASS(insn->code) == BPF_LDX &&
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12441 BPF_MODE(insn->code) == BPF_PROBE_MEM)
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12442 num_exentries++;
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12443 }
c4c0bdc0d2d084 Yonghong Song 2020-06-23 12444 func[i]->aux->num_exentries = num_exentries;
ebf7d1f508a738 Maciej Fijalkowski 2020-09-16 12445 func[i]->aux->tail_call_reachable = env->subprog_info[i].tail_call_reachable;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12446 func[i] = bpf_int_jit_compile(func[i]);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12447 if (!func[i]->jited) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12448 err = -ENOTSUPP;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12449 goto out_free;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12450 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12451 cond_resched();
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12452 }
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12453
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12454 /* at this point all bpf functions were successfully JITed
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12455 * now populate all bpf_calls with correct addresses and
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12456 * run last pass of JIT
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12457 */
f910cefa32b6cd Jiong Wang 2018-05-02 12458 for (i = 0; i < env->subprog_cnt; i++) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12459 insn = func[i]->insnsi;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12460 for (j = 0; j < func[i]->len; j++, insn++) {
69c087ba6225b5 Yonghong Song 2021-02-26 12461 if (bpf_pseudo_func(insn)) {
69c087ba6225b5 Yonghong Song 2021-02-26 12462 subprog = insn[1].imm;
69c087ba6225b5 Yonghong Song 2021-02-26 12463 insn[0].imm = (u32)(long)func[subprog]->bpf_func;
69c087ba6225b5 Yonghong Song 2021-02-26 12464 insn[1].imm = ((u64)(long)func[subprog]->bpf_func) >> 32;
69c087ba6225b5 Yonghong Song 2021-02-26 12465 continue;
69c087ba6225b5 Yonghong Song 2021-02-26 12466 }
23a2d70c7a2f28 Yonghong Song 2021-02-04 12467 if (!bpf_pseudo_call(insn))
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12468 continue;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12469 subprog = insn->off;
0d306c31b2f773 Prashant Bhole 2019-04-16 @12470 insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12471 __bpf_call_base;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12472 }
2162fed49fa86c Sandipan Das 2018-05-24 12473
2162fed49fa86c Sandipan Das 2018-05-24 12474 /* we use the aux data to keep a list of the start addresses
2162fed49fa86c Sandipan Das 2018-05-24 12475 * of the JITed images for each function in the program
2162fed49fa86c Sandipan Das 2018-05-24 12476 *
2162fed49fa86c Sandipan Das 2018-05-24 12477 * for some architectures, such as powerpc64, the imm field
2162fed49fa86c Sandipan Das 2018-05-24 12478 * might not be large enough to hold the offset of the start
2162fed49fa86c Sandipan Das 2018-05-24 12479 * address of the callee's JITed image from __bpf_call_base
2162fed49fa86c Sandipan Das 2018-05-24 12480 *
2162fed49fa86c Sandipan Das 2018-05-24 12481 * in such cases, we can lookup the start address of a callee
2162fed49fa86c Sandipan Das 2018-05-24 12482 * by using its subprog id, available from the off field of
2162fed49fa86c Sandipan Das 2018-05-24 12483 * the call instruction, as an index for this list
2162fed49fa86c Sandipan Das 2018-05-24 12484 */
2162fed49fa86c Sandipan Das 2018-05-24 12485 func[i]->aux->func = func;
2162fed49fa86c Sandipan Das 2018-05-24 12486 func[i]->aux->func_cnt = env->subprog_cnt;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12487 }
f910cefa32b6cd Jiong Wang 2018-05-02 12488 for (i = 0; i < env->subprog_cnt; i++) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12489 old_bpf_func = func[i]->bpf_func;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12490 tmp = bpf_int_jit_compile(func[i]);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12491 if (tmp != func[i] || func[i]->bpf_func != old_bpf_func) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12492 verbose(env, "JIT doesn't support bpf-to-bpf calls\n");
c7a897843224a9 Daniel Borkmann 2018-07-12 12493 err = -ENOTSUPP;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12494 goto out_free;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12495 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12496 cond_resched();
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12497 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12498
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12499 /* finally lock prog and jit images for all functions and
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12500 * populate kallsysm
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12501 */
f910cefa32b6cd Jiong Wang 2018-05-02 12502 for (i = 0; i < env->subprog_cnt; i++) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12503 bpf_prog_lock_ro(func[i]);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12504 bpf_prog_kallsyms_add(func[i]);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12505 }
7105e828c087de Daniel Borkmann 2017-12-20 12506
7105e828c087de Daniel Borkmann 2017-12-20 12507 /* Last step: make now unused interpreter insns from main
7105e828c087de Daniel Borkmann 2017-12-20 12508 * prog consistent for later dump requests, so they can
7105e828c087de Daniel Borkmann 2017-12-20 12509 * later look the same as if they were interpreted only.
7105e828c087de Daniel Borkmann 2017-12-20 12510 */
7105e828c087de Daniel Borkmann 2017-12-20 12511 for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) {
69c087ba6225b5 Yonghong Song 2021-02-26 12512 if (bpf_pseudo_func(insn)) {
69c087ba6225b5 Yonghong Song 2021-02-26 12513 insn[0].imm = env->insn_aux_data[i].call_imm;
69c087ba6225b5 Yonghong Song 2021-02-26 12514 insn[1].imm = find_subprog(env, i + insn[0].imm + 1);
69c087ba6225b5 Yonghong Song 2021-02-26 12515 continue;
69c087ba6225b5 Yonghong Song 2021-02-26 12516 }
23a2d70c7a2f28 Yonghong Song 2021-02-04 12517 if (!bpf_pseudo_call(insn))
7105e828c087de Daniel Borkmann 2017-12-20 12518 continue;
7105e828c087de Daniel Borkmann 2017-12-20 12519 insn->off = env->insn_aux_data[i].call_imm;
7105e828c087de Daniel Borkmann 2017-12-20 12520 subprog = find_subprog(env, i + insn->off + 1);
dbecd7388476ae Sandipan Das 2018-05-24 12521 insn->imm = subprog;
7105e828c087de Daniel Borkmann 2017-12-20 12522 }
7105e828c087de Daniel Borkmann 2017-12-20 12523
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12524 prog->jited = 1;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12525 prog->bpf_func = func[0]->bpf_func;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12526 prog->aux->func = func;
f910cefa32b6cd Jiong Wang 2018-05-02 12527 prog->aux->func_cnt = env->subprog_cnt;
e16301fbe1837c Martin KaFai Lau 2021-03-24 12528 bpf_prog_jit_attempt_done(prog);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12529 return 0;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12530 out_free:
f263a81451c12d John Fastabend 2021-07-07 12531 /* We failed JIT'ing, so at this point we need to unregister poke
f263a81451c12d John Fastabend 2021-07-07 12532 * descriptors from subprogs, so that kernel is not attempting to
f263a81451c12d John Fastabend 2021-07-07 12533 * patch it anymore as we're freeing the subprog JIT memory.
f263a81451c12d John Fastabend 2021-07-07 12534 */
f263a81451c12d John Fastabend 2021-07-07 12535 for (i = 0; i < prog->aux->size_poke_tab; i++) {
f263a81451c12d John Fastabend 2021-07-07 12536 map_ptr = prog->aux->poke_tab[i].tail_call.map;
f263a81451c12d John Fastabend 2021-07-07 12537 map_ptr->ops->map_poke_untrack(map_ptr, prog->aux);
f263a81451c12d John Fastabend 2021-07-07 12538 }
f263a81451c12d John Fastabend 2021-07-07 12539 /* At this point we're guaranteed that poke descriptors are not
f263a81451c12d John Fastabend 2021-07-07 12540 * live anymore. We can just unlink its descriptor table as it's
f263a81451c12d John Fastabend 2021-07-07 12541 * released with the main prog.
f263a81451c12d John Fastabend 2021-07-07 12542 */
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12543 for (i = 0; i < env->subprog_cnt; i++) {
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12544 if (!func[i])
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12545 continue;
f263a81451c12d John Fastabend 2021-07-07 12546 func[i]->aux->poke_tab = NULL;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12547 bpf_jit_free(func[i]);
a748c6975dea32 Maciej Fijalkowski 2020-09-16 12548 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12549 kfree(func);
c7a897843224a9 Daniel Borkmann 2018-07-12 12550 out_undo_insn:
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12551 /* cleanup main prog to be interpreted */
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12552 prog->jit_requested = 0;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12553 for (i = 0, insn = prog->insnsi; i < prog->len; i++, insn++) {
23a2d70c7a2f28 Yonghong Song 2021-02-04 12554 if (!bpf_pseudo_call(insn))
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12555 continue;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12556 insn->off = 0;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12557 insn->imm = env->insn_aux_data[i].call_imm;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12558 }
e16301fbe1837c Martin KaFai Lau 2021-03-24 12559 bpf_prog_jit_attempt_done(prog);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12560 return err;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12561 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 12562
:::::: The code at line 12470 was first introduced by commit
:::::: 0d306c31b2f77391dacdeaad4470c577f2aecc4f bpf: use BPF_CAST_CALL for casting bpf call
:::::: TO: Prashant Bhole <bhole_prashant_q7(a)lab.ntt.co.jp>
:::::: CC: Alexei Starovoitov <ast(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[intel-lts:5.10/preempt-rt 16141/17188] drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:54: error: no member named 'backlight' in 'struct nouveau_connector'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 3ab3139402e6adc34f10481f1c1c60459bcd0a7e
commit: ce5ae1651b65e1a62c2fd1c347a4a2473341bec7 [16141/17188] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau
config: riscv-randconfig-r042-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/ce5ae1651b65e1a62c2fd1c34...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout ce5ae1651b65e1a62c2fd1c347a4a2473341bec7
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/
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/gpu/drm/nouveau/dispnv50/disp.c:1390:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
drivers/gpu/drm/nouveau/dispnv50/disp.c:1414:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:54: error: no member named 'backlight' in 'struct nouveau_connector'
struct nouveau_backlight *backlight = nv_connector->backlight;
~~~~~~~~~~~~ ^
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1670:28: error: incomplete definition of type 'struct nouveau_backlight'
if (backlight && backlight->uses_dpcd) {
~~~~~~~~~^
drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:9: note: forward declaration of 'struct nouveau_backlight'
struct nouveau_backlight *backlight = nv_connector->backlight;
^
drivers/gpu/drm/nouveau/dispnv50/disp.c:1671:50: error: incomplete definition of type 'struct nouveau_backlight'
ret = drm_edp_backlight_disable(aux, &backlight->edp_info);
~~~~~~~~~^
drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:9: note: forward declaration of 'struct nouveau_backlight'
struct nouveau_backlight *backlight = nv_connector->backlight;
^
drivers/gpu/drm/nouveau/dispnv50/disp.c:2661:1: warning: no previous prototype for function 'nv50_display_create' [-Wmissing-prototypes]
nv50_display_create(struct drm_device *dev)
^
drivers/gpu/drm/nouveau/dispnv50/disp.c:2660:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
3 warnings and 3 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SKB_EXTENSIONS
Depends on NET
Selected by
- KCOV && ARCH_HAS_KCOV && (CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
vim +1665 drivers/gpu/drm/nouveau/dispnv50/disp.c
1652
1653 /* TODO: Should we extend this to PWM-only backlights?
1654 * As well, should we add a DRM helper for waiting for the backlight to acknowledge
1655 * the panel backlight has been shut off? Intel doesn't seem to do this, and uses a
1656 * fixed time delay from the vbios…
1657 */
1658 static void
1659 nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *state)
1660 {
1661 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1662 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
1663 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
1664 struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder);
> 1665 struct nouveau_backlight *backlight = nv_connector->backlight;
1666 struct drm_dp_aux *aux = &nv_connector->aux;
1667 int ret;
1668 u8 pwr;
1669
> 1670 if (backlight && backlight->uses_dpcd) {
1671 ret = drm_edp_backlight_disable(aux, &backlight->edp_info);
1672 if (ret < 0)
1673 NV_ERROR(drm, "Failed to disable backlight on [CONNECTOR:%d:%s]: %d\n",
1674 nv_connector->base.base.id, nv_connector->base.name, ret);
1675 }
1676
1677 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
1678 int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
1679
1680 if (ret == 0) {
1681 pwr &= ~DP_SET_POWER_MASK;
1682 pwr |= DP_SET_POWER_D3;
1683 drm_dp_dpcd_writeb(aux, DP_SET_POWER, pwr);
1684 }
1685 }
1686
1687 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
1688 nv50_audio_disable(encoder, nv_crtc);
1689 nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
1690 nv50_outp_release(nv_encoder);
1691 nv_encoder->crtc = NULL;
1692 }
1693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[kbingham-rcar:kbingham/vsp/v3u-rd-5.15 25/26] drivers/soc/renesas/rcar-irqc.c:46:6: warning: no previous prototype for function 'r8a7791_irqc_show'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git kbingham/vsp/v3u-rd-5.15
head: 61b5560118d70887c4acc6687912e78eb279bfde
commit: a9d6287bf4fbc6eff6f93606086c74a35d8ce5f0 [25/26] soc: renesas: rcar: IRQC debug handling
config: arm64-randconfig-r021-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add kbingham-rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags kbingham-rcar kbingham/vsp/v3u-rd-5.15
git checkout a9d6287bf4fbc6eff6f93606086c74a35d8ce5f0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/soc/renesas/rcar-irqc.c:46:6: warning: no previous prototype for function 'r8a7791_irqc_show' [-Wmissing-prototypes]
void r8a7791_irqc_show(const char *msg, unsigned int n)
^
drivers/soc/renesas/rcar-irqc.c:46:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void r8a7791_irqc_show(const char *msg, unsigned int n)
^
static
1 warning generated.
vim +/r8a7791_irqc_show +46 drivers/soc/renesas/rcar-irqc.c
45
> 46 void r8a7791_irqc_show(const char *msg, unsigned int n)
47 {
48 printk("%s:%u\n", msg, n);
49 printk("-LEVEL-- --HIGH-- --LOW--- -S-RISE- -S-FALL- -A-RISE- -A-FALL-\n");
50 printk("%08x %08x %08x %08x %08x %08x %08x\n",
51 ioread32(irqc + MONITOR), ioread32(irqc + HLVL_STS),
52 ioread32(irqc + LLVL_STS), ioread32(irqc + S_R_EDGE_STS),
53 ioread32(irqc + S_F_EDGE_STS), ioread32(irqc + A_R_EDGE_STS),
54 ioread32(irqc + A_F_EDGE_STS));
55 }
56
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
[intel-lts:5.4/preempt-rt 9824/19034] drivers/misc/vpusmm/vpusmm_driver.c:406:6: warning: no previous prototype for function 'vpusmm_dmabuf_release'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head: 2dc0f2c1ee89b9ce92944e397f2619062ebb77f8
commit: 2c4a98833ded50c324a6c5e7c949f93cca137acf [9824/19034] misc: vpusmm: add alloc/import DMABuf for VPU
config: arm-randconfig-r035-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel/linux-intel-lts/commit/2c4a98833ded50c324a6c5e7c...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/preempt-rt
git checkout 2c4a98833ded50c324a6c5e7c949f93cca137acf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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/misc/vpusmm/vpusmm_driver.c:406:6: warning: no previous prototype for function 'vpusmm_dmabuf_release' [-Wmissing-prototypes]
void vpusmm_dmabuf_release(struct dma_buf *dmabuf)
^
drivers/misc/vpusmm/vpusmm_driver.c:406:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vpusmm_dmabuf_release(struct dma_buf *dmabuf)
^
static
>> drivers/misc/vpusmm/vpusmm_driver.c:617:14: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
__func__, buff->dma_addr, phys_addr, dev_name(dev->dev));
^~~~~~~~~~~~~~
include/linux/printk.h:337:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:137:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
>> drivers/misc/vpusmm/vpusmm_driver.c:617:30: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
__func__, buff->dma_addr, phys_addr, dev_name(dev->dev));
^~~~~~~~~
include/linux/printk.h:337:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:137:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
>> drivers/misc/vpusmm/vpusmm_driver.c:936:9: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
vpusmm_dev->mem_res[i].start, vpusmm_dev->mem_res[i].end);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1747:33: note: expanded from macro 'dev_info'
_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:936:39: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
vpusmm_dev->mem_res[i].start, vpusmm_dev->mem_res[i].end);
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1747:33: note: expanded from macro 'dev_info'
_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
5 warnings generated.
vim +/vpusmm_dmabuf_release +406 drivers/misc/vpusmm/vpusmm_driver.c
405
> 406 void vpusmm_dmabuf_release(struct dma_buf *dmabuf)
407 {
408 // this buffer is only referencec by dmabuf
409 struct vpusmm_buffer *buff = dmabuf->priv;
410
411 if (buff) {
412 if (buff->cookie) {
413 dma_free_attrs(buff->dev, buff->size, buff->cookie, buff->dma_addr, buff->dma_attrs);
414 buff->cookie = NULL;
415 }
416 kfree(buff);
417 }
418 }
419
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks