Hi lkp,
Do you have try new patch file for bellowing issue?
">> drivers/usb/serial/pl2303.c:352:36: warning: restricted
__le16 degrades to integer"
Charles
kbuild test robot <[email protected]> 於 2018年12月25日 週二 下午11:39寫道:
>
> Hi Charles,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on usb-serial/usb-next]
> [also build test WARNING on v4.20 next-20181224]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Charles-Yeh/Add-Prolific-new-chip-PL2303TB-PL2303N-G/20181225-220256
> base: https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git
> usb-next
> config: x86_64-allmodconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
> include/linux/slab.h:332:43: warning: dubious: x & !y
> include/linux/slab.h:332:43: warning: dubious: x & !y
> >> drivers/usb/serial/pl2303.c:352:36: warning: restricted __le16 degrades to
> >> integer
> include/linux/slab.h:332:43: warning: dubious: x & !y
> include/linux/slab.h:332:43: warning: dubious: x & !y
>
> vim +352 drivers/usb/serial/pl2303.c
>
> 324
> 325 static int pl2303_startup(struct usb_serial *serial)
> 326 {
> 327 struct pl2303_serial_private *spriv;
> 328 enum pl2303_type type = TYPE_01;
> 329 unsigned char *buf;
> 330 int res;
> 331
> 332 spriv = kzalloc(sizeof(*spriv), GFP_KERNEL);
> 333 if (!spriv)
> 334 return -ENOMEM;
> 335
> 336 buf = kmalloc(1, GFP_KERNEL);
> 337 if (!buf) {
> 338 kfree(spriv);
> 339 return -ENOMEM;
> 340 }
> 341
> 342 if (serial->dev->descriptor.bDeviceClass == 0x02)
> 343 type = TYPE_01; /* type 0 */
> 344 else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
> 345 type = TYPE_HX;
> 346 else if (serial->dev->descriptor.bDeviceClass == 0x00)
> 347 type = TYPE_01; /* type 1 */
> 348 else if (serial->dev->descriptor.bDeviceClass == 0xFF)
> 349 type = TYPE_01; /* type 1 */
> 350 dev_dbg(&serial->interface->dev, "device type: %d\n", type);
> 351
> > 352 if (serial->dev->descriptor.bcdUSB == 0x0200) {
> 353 res = usb_control_msg(serial->dev,
> usb_rcvctrlpipe(serial->dev, 0),
> 354 VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE,
> 355 TYPE_HX_READ_OTP_STATUS_REGISTER, 0, buf, 1,
> 100);
> 356 if (res != 1)
> 357 type = TYPE_HXN;
> 358 }
> 359
> 360 spriv->type = &pl2303_type_data[type];
> 361 spriv->quirks = (unsigned long)usb_get_serial_data(serial);
> 362 spriv->quirks |= spriv->type->quirks;
> 363
> 364 usb_set_serial_data(serial, spriv);
> 365
> 366 if (type != TYPE_HXN) {
> 367 pl2303_vendor_read(serial, 0x8484, buf);
> 368 pl2303_vendor_write(serial, 0x0404, 0);
> 369 pl2303_vendor_read(serial, 0x8484, buf);
> 370 pl2303_vendor_read(serial, 0x8383, buf);
> 371 pl2303_vendor_read(serial, 0x8484, buf);
> 372 pl2303_vendor_write(serial, 0x0404, 1);
> 373 pl2303_vendor_read(serial, 0x8484, buf);
> 374 pl2303_vendor_read(serial, 0x8383, buf);
> 375 pl2303_vendor_write(serial, 0, 1);
> 376 pl2303_vendor_write(serial, 1, 0);
> 377 if (spriv->quirks & PL2303_QUIRK_LEGACY)
> 378 pl2303_vendor_write(serial, 2, 0x24);
> 379 else
> 380 pl2303_vendor_write(serial, 2, 0x44);
> 381 }
> 382
> 383 kfree(buf);
> 384
> 385 return 0;
> 386 }
> 387
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation