From: kernel test robot <lkp@intel.com>
To: Hyeonki Hong <hhk7734@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Dongjin Kim <tobetter@gmail.com>
Subject: [tobetter:odroid-6.15.y 7/42] drivers/input/touchscreen/dwav-usb-mt.c:462:3: error: call to undeclared library function 'strlcpy' with type 'unsigned int (char *, const char *, unsigned int)'; ISO C99 and later do not support implicit function declarations
Date: Thu, 29 May 2025 18:03:22 +0800 [thread overview]
Message-ID: <202505291708.pOUna8DN-lkp@intel.com> (raw)
tree: https://github.com/tobetter/linux odroid-6.15.y
head: 62efa5294148d0ccb18203491839df4fb9dc18d1
commit: c289e7ada529d848e47a01543adbc1f2fa8da7e6 [7/42] ODROID-COMMON: input/touchscreen: Add D-WAV Multitouch driver.
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250529/202505291708.pOUna8DN-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250529/202505291708.pOUna8DN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505291708.pOUna8DN-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/input/touchscreen/dwav-usb-mt.c:462:3: error: call to undeclared library function 'strlcpy' with type 'unsigned int (char *, const char *, unsigned int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
462 | strlcpy(dwav_usb_mt->name,
| ^
drivers/input/touchscreen/dwav-usb-mt.c:462:3: note: include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 error generated.
vim +462 drivers/input/touchscreen/dwav-usb-mt.c
397
398 static int dwav_usb_mt_probe(struct usb_interface *intf,
399 const struct usb_device_id *id)
400 {
401 struct dwav_usb_mt *dwav_usb_mt = NULL;
402 struct input_dev *input_dev = NULL;
403 struct usb_endpoint_descriptor *endpoint;
404 struct usb_device *udev = interface_to_usbdev(intf);
405
406 int err = 0;
407
408 endpoint = dwav_usb_mt_get_input_endpoint(intf->cur_altsetting);
409 if (!endpoint)
410 return -ENXIO;
411
412 dwav_usb_mt = kzalloc(sizeof(struct dwav_usb_mt), GFP_KERNEL);
413 if (!dwav_usb_mt)
414 return -ENOMEM;
415
416 dwav_usb_mt->dev_id = id->driver_info;
417
418 dwav_usb_mt->finger = kzalloc(sizeof(struct finger_t) *
419 DEV_INFO[dwav_usb_mt->dev_id].max_finger,
420 GFP_KERNEL);
421
422 if (!dwav_usb_mt->finger)
423 goto err_free_mem;
424
425 input_dev = input_allocate_device();
426 if (!input_dev)
427 goto err_free_mem;
428
429 dwav_usb_mt->data_size = sizeof(struct dwav_raw);
430 dwav_usb_mt->data = usb_alloc_coherent(udev, dwav_usb_mt->data_size,
431 GFP_KERNEL, &dwav_usb_mt->data_dma);
432 if (!dwav_usb_mt->data)
433 goto err_free_mem;
434
435 dwav_usb_mt->irq = usb_alloc_urb(0, GFP_KERNEL);
436 if (!dwav_usb_mt->irq) {
437 dev_dbg(&intf->dev,
438 "%s - usb_alloc_urb failed: usbtouch->irq\n",
439 __func__);
440 goto err_free_buffers;
441 }
442
443 if (usb_endpoint_type(endpoint) == USB_ENDPOINT_XFER_INT) {
444 usb_fill_int_urb(dwav_usb_mt->irq, udev,
445 usb_rcvintpipe(udev, endpoint->bEndpointAddress),
446 dwav_usb_mt->data, dwav_usb_mt->data_size,
447 dwav_usb_mt_irq, dwav_usb_mt, endpoint->bInterval);
448 } else {
449 usb_fill_bulk_urb(dwav_usb_mt->irq, udev,
450 usb_rcvbulkpipe(udev, endpoint->bEndpointAddress),
451 dwav_usb_mt->data, dwav_usb_mt->data_size,
452 dwav_usb_mt_irq, dwav_usb_mt);
453 }
454
455 dwav_usb_mt->irq->dev = udev;
456 dwav_usb_mt->irq->transfer_dma = dwav_usb_mt->data_dma;
457 dwav_usb_mt->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
458
459 dwav_usb_mt->interface = intf;
460
461 if (udev->manufacturer)
> 462 strlcpy(dwav_usb_mt->name,
463 udev->manufacturer, sizeof(dwav_usb_mt->name));
464
465 if (udev->product) {
466 if (udev->manufacturer)
467 strlcat(dwav_usb_mt->name,
468 " ", sizeof(dwav_usb_mt->name));
469
470 strlcat(dwav_usb_mt->name,
471 udev->product, sizeof(dwav_usb_mt->name));
472 }
473
474 if (!strlen(dwav_usb_mt->name)) {
475 snprintf(dwav_usb_mt->name, sizeof(dwav_usb_mt->name),
476 "D-WAV Scientific MultiTouch %04x:%04x",
477 le16_to_cpu(udev->descriptor.idVendor),
478 le16_to_cpu(udev->descriptor.idProduct));
479 }
480
481 usb_make_path(udev, dwav_usb_mt->phys, sizeof(dwav_usb_mt->phys));
482 strlcat(dwav_usb_mt->phys, "/input0", sizeof(dwav_usb_mt->phys));
483
484 usb_to_input_id(udev, &input_dev->id);
485
486 input_dev->dev.parent = &intf->dev;
487
488 err = dwav_usb_mt_init(dwav_usb_mt, (void *)input_dev);
489 if (err)
490 goto err_free_urb;
491
492 usb_set_intfdata(intf, dwav_usb_mt);
493
494 dev_info(&intf->dev, "%s\n", DEV_INFO[dwav_usb_mt->dev_id].name);
495
496 return 0;
497
498 err_free_urb:
499 usb_free_urb(dwav_usb_mt->irq);
500
501 err_free_buffers:
502 dwav_usb_mt_free_buffers(udev, dwav_usb_mt);
503
504 err_free_mem:
505 if (input_dev)
506 input_free_device(input_dev);
507 kfree(dwav_usb_mt);
508
509 return err;
510 }
511
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-05-29 10:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505291708.pOUna8DN-lkp@intel.com \
--to=lkp@intel.com \
--cc=hhk7734@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tobetter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox