CC: [email protected]
CC: [email protected]
TO: Michael Zaidman <[email protected]>
CC: Jiri Kosina <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   9e65da135b39cabd82dc2f56b0db526b65a8d690
commit: 6a82582d9fa438045191074856f47165334f2777 HID: ft260: add usb hid to i2c 
host bridge driver
date:   9 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 9 months ago
compiler: arc-elf-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck warnings: (new ones prefixed by >>)
>> drivers/hid/hid-prodikeys.c:107:9: warning: %u in format string (no. 2) 
>> requires 'unsigned int' but the argument type is 'signed int'. 
>> [invalidPrintfArgType_uint]
    return sprintf(buf, "%u (min:%u, max:%u)n", pk->pm->midi_channel,
           ^
   drivers/hid/hid-prodikeys.c:107:9: warning: %u in format string (no. 3) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (min:%u, max:%u)n", pk->pm->midi_channel,
           ^
   drivers/hid/hid-prodikeys.c:144:9: warning: %u in format string (no. 2) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (off:%u, max:%u (ms))n", pk->pm->midi_sustain,
           ^
   drivers/hid/hid-prodikeys.c:144:9: warning: %u in format string (no. 3) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (off:%u, max:%u (ms))n", pk->pm->midi_sustain,
           ^

cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/hid/hid-prodikeys.c:107:9: warning: %u in format string (no. 2) 
>> requires 'unsigned int' but the argument type is 'signed int'. 
>> [invalidPrintfArgType_uint]
    return sprintf(buf, "%u (min:%u, max:%u)n", pk->pm->midi_channel,
           ^
   drivers/hid/hid-prodikeys.c:107:9: warning: %u in format string (no. 3) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (min:%u, max:%u)n", pk->pm->midi_channel,
           ^
   drivers/hid/hid-prodikeys.c:144:9: warning: %u in format string (no. 2) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (off:%u, max:%u (ms))n", pk->pm->midi_sustain,
           ^
   drivers/hid/hid-prodikeys.c:144:9: warning: %u in format string (no. 3) 
requires 'unsigned int' but the argument type is 'signed int'. 
[invalidPrintfArgType_uint]
    return sprintf(buf, "%u (off:%u, max:%u (ms))n", pk->pm->midi_sustain,
           ^
>> drivers/hid/hid-ft260.c:374:0: warning: syntax error [syntaxError]
   
   ^
--
>> drivers/hid/wacom_sys.c:1781:2: warning: %ld in format string (no. 1) 
>> requires 'long' but the argument type is 'unsigned long'. 
>> [invalidPrintfArgType_sint]
    sprintf(battery->bat_name, "wacom_battery_%ld", n);
    ^

vim +374 drivers/hid/hid-ft260.c

6a82582d9fa438 Michael Zaidman 2021-02-19  351  
6a82582d9fa438 Michael Zaidman 2021-02-19  352  static int 
ft260_hid_output_report_check_status(struct ft260_device *dev,
6a82582d9fa438 Michael Zaidman 2021-02-19  353                                  
                u8 *data, int len)
6a82582d9fa438 Michael Zaidman 2021-02-19  354  {
6a82582d9fa438 Michael Zaidman 2021-02-19  355          int ret, usec, try = 3;
6a82582d9fa438 Michael Zaidman 2021-02-19  356          struct hid_device *hdev 
= dev->hdev;
6a82582d9fa438 Michael Zaidman 2021-02-19  357  
6a82582d9fa438 Michael Zaidman 2021-02-19  358          ret = 
ft260_hid_output_report(hdev, data, len);
6a82582d9fa438 Michael Zaidman 2021-02-19  359          if (ret < 0) {
6a82582d9fa438 Michael Zaidman 2021-02-19  360                  hid_err(hdev, 
"%s: failed to start transfer, ret %d\n",
6a82582d9fa438 Michael Zaidman 2021-02-19  361                          
__func__, ret);
6a82582d9fa438 Michael Zaidman 2021-02-19  362                  
ft260_i2c_reset(hdev);
6a82582d9fa438 Michael Zaidman 2021-02-19  363                  return ret;
6a82582d9fa438 Michael Zaidman 2021-02-19  364          }
6a82582d9fa438 Michael Zaidman 2021-02-19  365  
6a82582d9fa438 Michael Zaidman 2021-02-19  366          /* transfer time = 1 / 
clock(KHz) * 10 bits * bytes */
6a82582d9fa438 Michael Zaidman 2021-02-19  367          usec = 10000 / 
dev->clock * len;
6a82582d9fa438 Michael Zaidman 2021-02-19  368          usleep_range(usec, usec 
+ 100);
6a82582d9fa438 Michael Zaidman 2021-02-19  369          ft260_dbg("wait %d 
usec, len %d\n", usec, len);
6a82582d9fa438 Michael Zaidman 2021-02-19  370          do {
6a82582d9fa438 Michael Zaidman 2021-02-19  371                  ret = 
ft260_xfer_status(dev);
6a82582d9fa438 Michael Zaidman 2021-02-19  372                  if (ret != 
-EAGAIN)
6a82582d9fa438 Michael Zaidman 2021-02-19  373                          break;
6a82582d9fa438 Michael Zaidman 2021-02-19 @374          } while (--try);
6a82582d9fa438 Michael Zaidman 2021-02-19  375  
6a82582d9fa438 Michael Zaidman 2021-02-19  376          if (ret == 0 || ret == 
-EBUSY)
6a82582d9fa438 Michael Zaidman 2021-02-19  377                  return 0;
6a82582d9fa438 Michael Zaidman 2021-02-19  378  
6a82582d9fa438 Michael Zaidman 2021-02-19  379          ft260_i2c_reset(hdev);
6a82582d9fa438 Michael Zaidman 2021-02-19  380          return -EIO;
6a82582d9fa438 Michael Zaidman 2021-02-19  381  }
6a82582d9fa438 Michael Zaidman 2021-02-19  382  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to