Skip to contentSkip to conversation

drivers/misc/xlink-usb/local_host/u_xlink.c:1002 vpu_read_swid() error: uninitialized symbol 'BUF4'.

PATCH New Dan Carpenter 1 participant 1 message Dec 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 415/1142 drivers/misc/xlink-usb/local_host/u_xlink.c:1002 vpu_read_swid() error: uninitialized symbol 'BUF4'.

tree:   https://github.com/intel/linux-intel-lts.git 5.4/yocto
head:   eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 5e9e6d86fe729cf81e8a0df5c53d326b9f2ec791 [415/1142] xlink-usb: XLink USB Remote and Local Host driver
config: i386-randconfig-m021-20201211 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate

smatch warnings:
drivers/misc/xlink-usb/local_host/u_xlink.c:1002 vpu_read_swid() error: uninitialized symbol 'BUF4'.

vim +/BUF4 +1002 drivers/misc/xlink-usb/local_host/u_xlink.c

5e9e6d86fe729c Lai Jun Ann 2020-07-03   987  int *vpu_read_swid(void *data)
5e9e6d86fe729c Lai Jun Ann 2020-07-03   988  {
5e9e6d86fe729c Lai Jun Ann 2020-07-03   989  	struct gs_port *port;
5e9e6d86fe729c Lai Jun Ann 2020-07-03   990  
5e9e6d86fe729c Lai Jun Ann 2020-07-03   991  	port = ports[PORT_NUM].port;
5e9e6d86fe729c Lai Jun Ann 2020-07-03   992  	struct list_head	*pool = &port->read_pool;
5e9e6d86fe729c Lai Jun Ann 2020-07-03   993  	int *BUF4;
5e9e6d86fe729c Lai Jun Ann 2020-07-03   994  	struct usb_request	*req;
5e9e6d86fe729c Lai Jun Ann 2020-07-03   995  
5e9e6d86fe729c Lai Jun Ann 2020-07-03   996  	while (!list_empty(pool)) {
5e9e6d86fe729c Lai Jun Ann 2020-07-03   997  		req = list_entry(pool->next, struct usb_request, list);
5e9e6d86fe729c Lai Jun Ann 2020-07-03   998  		list_del(&req->list);
5e9e6d86fe729c Lai Jun Ann 2020-07-03   999  		BUF4 = req->buf;
5e9e6d86fe729c Lai Jun Ann 2020-07-03  1000  		break;
5e9e6d86fe729c Lai Jun Ann 2020-07-03  1001  	}
5e9e6d86fe729c Lai Jun Ann 2020-07-03 @1002  	return BUF4;
                                                ^^^^^^^^^^^

Can this be called when the pool list is empty?

5e9e6d86fe729c Lai Jun Ann 2020-07-03 1003 }

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