All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-4.4 9949/9999] drivers/hid/wacom_sys.c:65:27: warning: comparison of integers of different signs: 'unsigned int' and 'int'
@ 2020-07-08 18:41 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-08 18:41 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head:   41d1c6f7b0e49c7e960317431af4ed4686ff67fe
commit: e473b7b1adc41346995dce63a62d5d40e2c3beef [9949/9999] UPSTREAM: HID: wacom: Queue events with missing type/serial data for later processing
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout e473b7b1adc41346995dce63a62d5d40e2c3beef
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from drivers/hid/wacom_sys.c:14:
   In file included from drivers/hid/wacom_wac.h:13:
   In file included from include/linux/hid.h:30:
   In file included from include/linux/slab.h:14:
   In file included from include/linux/gfp.h:5:
   In file included from include/linux/mmzone.h:7:
   In file included from include/linux/spinlock.h:87:
   In file included from arch/x86/include/asm/spinlock.h:219:
   In file included from arch/x86/include/asm/qrwlock.h:5:
   include/asm-generic/qrwlock.h:93:36: warning: comparison of integers of different signs: 'int' and 'u32' (aka 'unsigned int') [-Wsign-compare]
                                                cnts, cnts | _QW_LOCKED) == cnts);
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
   include/linux/compiler.h:181:40: note: expanded from macro 'likely'
   # define likely(x)      __builtin_expect(!!(x), 1)
                                               ^
   In file included from drivers/hid/wacom_sys.c:14:
   In file included from drivers/hid/wacom_wac.h:13:
   In file included from include/linux/hid.h:30:
   In file included from include/linux/slab.h:113:
   In file included from include/linux/kasan.h:4:
   In file included from include/linux/sched.h:62:
   In file included from include/linux/cgroup-defs.h:16:
   include/linux/percpu-refcount.h:177:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
                   this_cpu_add(*percpu_count, nr);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
   #define this_cpu_add(pcp, val)          __pcpu_size_call(this_cpu_add_, pcp, val)
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
                   case 8: stem##8(variable, __VA_ARGS__);break;           \
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   <scratch space>:91:1: note: expanded from here
   this_cpu_add_8
   ^
   arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
   #define this_cpu_add_8(pcp, val)                percpu_add_op((pcp), val)
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
                                 ((val) == 1 || (val) == -1)) ?            \
                                                 ~~~  ^  ~~
   In file included from drivers/hid/wacom_sys.c:14:
   In file included from drivers/hid/wacom_wac.h:13:
   In file included from include/linux/hid.h:30:
   In file included from include/linux/slab.h:113:
   In file included from include/linux/kasan.h:4:
   In file included from include/linux/sched.h:62:
   In file included from include/linux/cgroup-defs.h:16:
   include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
                   this_cpu_sub(*percpu_count, nr);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
   #define this_cpu_sub(pcp, val)          this_cpu_add(pcp, -(typeof(pcp))(val))
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
   #define this_cpu_add(pcp, val)          __pcpu_size_call(this_cpu_add_, pcp, val)
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
                   case 8: stem##8(variable, __VA_ARGS__);break;           \
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   <scratch space>:395:1: note: expanded from here
   this_cpu_add_8
   ^
   arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
   #define this_cpu_add_8(pcp, val)                percpu_add_op((pcp), val)
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
                                 ((val) == 1 || (val) == -1)) ?            \
                                                 ~~~  ^  ~~
   In file included from drivers/hid/wacom_sys.c:15:
   In file included from drivers/hid/wacom.h:95:
   In file included from include/linux/usb/input.h:12:
   In file included from include/linux/usb.h:15:
   In file included from include/linux/interrupt.h:12:
   In file included from include/linux/hardirq.h:8:
   In file included from arch/x86/include/asm/hardirq.h:5:
   In file included from include/linux/irq.h:418:
   In file included from arch/x86/include/asm/hw_irq.h:26:
   In file included from arch/x86/include/asm/sections.h:5:
   arch/x86/include/asm/uaccess.h:754:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
           if (likely(sz < 0 || sz >= n)) {
                                ~~ ^  ~
   include/linux/compiler.h:181:40: note: expanded from macro 'likely'
   # define likely(x)      __builtin_expect(!!(x), 1)
                                               ^
   In file included from drivers/hid/wacom_sys.c:15:
   In file included from drivers/hid/wacom.h:95:
   In file included from include/linux/usb/input.h:12:
   In file included from include/linux/usb.h:15:
   In file included from include/linux/interrupt.h:12:
   In file included from include/linux/hardirq.h:8:
   In file included from arch/x86/include/asm/hardirq.h:5:
   In file included from include/linux/irq.h:418:
   In file included from arch/x86/include/asm/hw_irq.h:26:
   In file included from arch/x86/include/asm/sections.h:5:
   arch/x86/include/asm/uaccess.h:773:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
           if (likely(sz < 0 || sz >= n)) {
                                ~~ ^  ~
   include/linux/compiler.h:181:40: note: expanded from macro 'likely'
   # define likely(x)      __builtin_expect(!!(x), 1)
                                               ^
>> drivers/hid/wacom_sys.c:65:27: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
           while (kfifo_avail(fifo) < size) {
                  ~~~~~~~~~~~~~~~~~ ^ ~~~~
   drivers/hid/wacom_sys.c:107:16: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
           for (i = 0; i < report->maxfield; i++) {
                       ~ ^ ~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:108:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                   for (j = 0; j < report->field[i]->maxusage; j++) {
                               ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:388:23: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                   if (i-4 >= 0 && i+1 < field->maxusage &&
                                   ~~~ ^ ~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:469:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                   for (i = 0; i < hreport->maxfield; i++) {
                               ~ ^ ~~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:474:18: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                           for (j = 0; j < hreport->field[i]->maxusage; j++) {
                                       ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:488:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                   for (i = 0; i < hreport->maxfield; i++)
                               ~ ^ ~~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:489:18: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
                           for (j = 0; j < hreport->field[i]->maxusage; j++)
                                       ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:1358:15: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
           if (group_id >= wacom->led.count || count <= 0)
               ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:2399:20: warning: comparison of integers of different signs: 'const __u32' (aka 'const unsigned int') and 'int' [-Wsign-compare]
                               id->product == wacom_wac->pid)
                               ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   drivers/hid/wacom_sys.c:2682:57: warning: comparison of integers of different signs: 'int' and 'enum hid_type' [-Wsign-compare]
           if (features->check_for_hid_type && features->hid_type != hdev->type) {
                                               ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
   17 warnings generated.

vim +65 drivers/hid/wacom_sys.c

    58	
    59	static void wacom_wac_queue_insert(struct hid_device *hdev,
    60					   struct kfifo_rec_ptr_2 *fifo,
    61					   u8 *raw_data, int size)
    62	{
    63		bool warned = false;
    64	
  > 65		while (kfifo_avail(fifo) < size) {
    66			if (!warned)
    67				hid_warn(hdev, "%s: kfifo has filled, starting to drop events\n", __func__);
    68			warned = true;
    69	
    70			kfifo_skip(fifo);
    71		}
    72	
    73		kfifo_in(fifo, raw_data, size);
    74	}
    75	

---
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: 53076 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-08 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 18:41 [chrome-os:chromeos-4.4 9949/9999] drivers/hid/wacom_sys.c:65:27: warning: comparison of integers of different signs: 'unsigned int' and 'int' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.