Re: [PATCH 3/3] staging: r8188eu: Shorten calls chain of rtw_write8/16/32/N()

kernel test robot
2021-09-04T17:10:15Z

[-- Attachment #1: Type: text/plain, Size: 4404 bytes --]

Hi "Fabio,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url: https://github.com/0day-ci/linux/commits/Fabio-M-De-Francesco/staging-r8188eu-Shorten-and-simplify-calls-chain/20210904-231010
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git fde4862d1ac7100028da4371d92454fec6cf3f4f
config: sh-allmodconfig (attached as .config)
compiler: sh4-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/0day-ci/linux/commit/a08da7fbe9a78b73da29c82c244b022186aa035c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-M-De-Francesco/staging-r8188eu-Shorten-and-simplify-calls-chain/20210904-231010
git checkout a08da7fbe9a78b73da29c82c244b022186aa035c
# 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=sh SHELL=/bin/bash drivers/staging/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/staging/r8188eu/hal/usb_ops_linux.c: In function 'usb_write':
>> drivers/staging/r8188eu/hal/usb_ops_linux.c:105:47: error: 'REALTEK_USB_VENQT_SEND' undeclared (first use in this function); did you mean 'REALTEK_USB_VENQT_READ'?
105 | REALTEK_USB_VENQT_SEND, value,
| ^~~~~~~~~~~~~~~~~~~~~~
| REALTEK_USB_VENQT_READ
drivers/staging/r8188eu/hal/usb_ops_linux.c:105:47: note: each undeclared identifier is reported only once for each function it appears in

vim +105 drivers/staging/r8188eu/hal/usb_ops_linux.c

75
76 static int usb_write(struct intf_hdl *intfhdl, u32 addr, void *data, u8 size)
77 {
78 u16 value = (u16)(addr & 0x0000ffff);
79 struct adapter *adapt = intfhdl->padapter;
80 struct dvobj_priv *dvobjpriv = adapter_to_dvobj(adapt);
81 struct usb_device *udev = dvobjpriv->pusbdev;
82 int status;
83 u8 *io_buf;
84 int vendorreq_times = 0;
85
86 if (adapt->bSurpriseRemoved || adapt->pwrctrlpriv.pnp_bstop_trx) {
87 status = -EPERM;
88 goto exit;
89 }
90
91 mutex_lock(&dvobjpriv->usb_vendor_req_mutex);
92
93 /* Acquire IO memory for vendorreq */
94 io_buf = dvobjpriv->usb_vendor_req_buf;
95
96 if (!io_buf) {
97 DBG_88E("[%s] io_buf == NULL\n", __func__);
98 status = -ENOMEM;
99 goto release_mutex;
100 }
101
102 memcpy(io_buf, data, size);
103 while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
104 status = usb_control_msg_send(udev, 0, REALTEK_USB_VENQT_CMD_REQ,
> 105 REALTEK_USB_VENQT_SEND, value,
106 REALTEK_USB_VENQT_CMD_IDX, io_buf,
107 size, RTW_USB_CONTROL_MSG_TIMEOUT,
108 GFP_KERNEL);
109 if (!status) { /* Success this control transfer. */
110 rtw_reset_continual_urb_error(dvobjpriv);
111 } else { /* error cases */
112 DBG_88E("reg 0x%x, usb %s %u fail, status:%d vendorreq_times:%d\n",
113 value, "read", size, status, vendorreq_times);
114
115 if (status == (-ESHUTDOWN) || status == -ENODEV) {
116 adapt->bSurpriseRemoved = true;
117 } else {
118 struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
119
120 haldata->srestpriv.wifi_error_status = USB_VEN_REQ_CMD_FAIL;
121 }
122
123 if (rtw_inc_and_chk_continual_urb_error(dvobjpriv)) {
124 adapt->bSurpriseRemoved = true;
125 break;
126 }
127 }
128
129 /* firmware download is checksummed, don't retry */
130 if ((value >= FW_8188E_START_ADDRESS && value <= FW_8188E_END_ADDRESS) || !status)
131 break;
132 }
133
134 release_mutex:
135 mutex_unlock(&dvobjpriv->usb_vendor_req_mutex);
136 exit:
137 return status;
138 }
139

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 55310 bytes --]