Hi Angelo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb-serial/usb-next]
[also build test WARNING on peter.chen-usb/ci-for-usb-next balbi-usb/testing/next
usb/usb-testing v5.8-rc5 next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Angelo-Dureghello/USB-serial-add...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git usb-next
config: parisc-randconfig-s031-20200714 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-41-g14e84ffc-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc
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/usb/serial/xr21v1412.c:149:42: sparse: sparse: Using
plain integer as NULL pointer
vim +149 drivers/usb/serial/xr21v1412.c
136
137 static int xr21v1412_xr_set_register(struct usb_device *udev, u16 reg, u16 val)
138 {
139 int retry = REG_SET_RETRY;
140 int status, size;
141
142 while (retry--) {
143 status = usb_control_msg(udev,
144 usb_sndctrlpipe(udev, 0),
145 REQ_SET_REG,
146 REQ_TYPE_XR_SET_REG,
147 val & 0xff,
148 reg,
149 0,
150 0,
151 USB_CTRL_SET_TIMEOUT);
152 if (status < 0) {
153 status = usb_translate_errors(status);
154 if (status == -EIO)
155 continue;
156 } else if (status != size) {
157 /* Retry on short transfers */
158 status = -EIO;
159 continue;
160 } else {
161 status = 0;
162 }
163
164 break;
165 }
166
167 if (status) {
168 dev_err(&udev->dev, "failed to set register 0x%x: %d\n",
169 reg, status);
170 }
171
172 return status;
173 }
174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org