[linux-stable-rc:linux-3.14.y 4656/4787] drivers/hid/hid-input.c:1087:2: note: in expansion of macro 'if'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.14.y
head:   836a24d6291c76c802d0968be9efb050dbf955e6
commit: 3711edaf01a01818f2aed9f21efe29b9818134b9 [4656/4787] compiler-gcc: integrate the various compiler-gcc[345].h files
config: i386-randconfig-s1-201627 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout 3711edaf01a01818f2aed9f21efe29b9818134b9
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/hid/hid-input.c:28:
   drivers/hid/hid-input.c: In function 'hidinput_hid_event':
   drivers/hid/hid-input.c:1087:67: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
                                                                      ^
   include/linux/compiler.h:134:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/hid/hid-input.c:1087:2: note: in expansion of macro 'if'
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
     ^~
   drivers/hid/hid-input.c:1087:67: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
                                                                      ^
   include/linux/compiler.h:134:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/hid/hid-input.c:1087:2: note: in expansion of macro 'if'
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
     ^~
   drivers/hid/hid-input.c:1087:67: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
                                                                      ^
   include/linux/compiler.h:145:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/hid/hid-input.c:1087:2: note: in expansion of macro 'if'
     if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
     ^~
--
   drivers/usb/gadget/f_fs.c: In function 'ffs_epfile_io':
>> drivers/usb/gadget/f_fs.c:670:17: warning: 'data_len' may be used uninitialized in this function [-Wmaybe-uninitialized]
      req->length   = data_len;
      ~~~~~~~~~~~~~~^~~~~~~~~~
--
   drivers/video/i740fb.c: In function 'i740fb_decode_var':
>> drivers/video/i740fb.c:661:26: warning: 'wm' may be used uninitialized in this function [-Wmaybe-uninitialized]
     par->lmi_fifo_watermark =
     ~~~~~~~~~~~~~~~~~~~~~~~~^
      i740_calc_fifo(par, 1000000 / var->pixclock, bpp);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:13,
                    from include/linux/cgroup.h:11,
                    from kernel/cgroup.c:29:
   kernel/cgroup.c: In function 'parse_cgroupfs_options':
   include/linux/compiler.h:134:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
        ^
   include/linux/compiler.h:132:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> kernel/cgroup.c:1235:2: note: in expansion of macro 'if'
     if (all_ss || (!one_ss && !opts->none && !opts->name))
     ^~
   At top level:
   kernel/cgroup.c:3839:36: warning: 'cgroup_pidlist_seq_operations' defined but not used [-Wunused-const-variable=]
    static const struct seq_operations cgroup_pidlist_seq_operations = {
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   net/bluetooth/hidp/core.c: In function 'hidp_connection_add':
>> net/bluetooth/hidp/core.c:1372:8: warning: 'session' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ret = l2cap_register_user(conn, &session->user);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from sound/usb/usx2y/us122l.c:20:0:
   sound/usb/usx2y/us122l.c: In function 'snd_us122l_probe':
>> include/linux/usb.h:199:2: warning: 'card' may be used uninitialized in this function [-Wmaybe-uninitialized]
     dev_set_drvdata(&intf->dev, data);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/usb/usx2y/us122l.c:607:19: note: 'card' was declared here
     struct snd_card *card;
                      ^~~~
   In file included from sound/usb/usx2y/us122l.c:23:0:
>> include/sound/core.h:305:53: warning: 'card' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr))
                                                        ^
   sound/usb/usx2y/us122l.c:578:19: note: 'card' was declared here
     struct snd_card *card;
                      ^~~~
--
   In file included from sound/usb/usx2y/usbusx2y.c:139:0:
   sound/usb/usx2y/usbusx2y.c: In function 'snd_usX2Y_probe':
>> include/sound/core.h:305:53: warning: 'card' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr))
                                                        ^
   sound/usb/usx2y/usbusx2y.c:376:20: note: 'card' was declared here
     struct snd_card * card;
                       ^~~~

vim +/if +1087 drivers/hid/hid-input.c

20f6cd730 David Herrmann 2014-12-29  1071  	 * not only an optimization but also fixes 'dead' key reports. Some
20f6cd730 David Herrmann 2014-12-29  1072  	 * RollOver implementations for localized keys (like BACKSLASH/PIPE; HID
20f6cd730 David Herrmann 2014-12-29  1073  	 * 0x31 and 0x32) report multiple keys, even though a localized keyboard
20f6cd730 David Herrmann 2014-12-29  1074  	 * can only have one of them physically available. The 'dead' keys
20f6cd730 David Herrmann 2014-12-29  1075  	 * report constant 0. As all map to the same keycode, they'd confuse
20f6cd730 David Herrmann 2014-12-29  1076  	 * the input layer. If we filter the 'dead' keys on the HID level, we
20f6cd730 David Herrmann 2014-12-29  1077  	 * skip the keycode translation and only forward real events.
20f6cd730 David Herrmann 2014-12-29  1078  	 */
20f6cd730 David Herrmann 2014-12-29  1079  	if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
20f6cd730 David Herrmann 2014-12-29  1080  	                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&
f3995eb51 Jiri Kosina    2015-01-06  1081  			      (field->flags & HID_MAIN_ITEM_VARIABLE) &&
20f6cd730 David Herrmann 2014-12-29  1082  	    usage->usage_index < field->maxusage &&
20f6cd730 David Herrmann 2014-12-29  1083  	    value == field->value[usage->usage_index])
20f6cd730 David Herrmann 2014-12-29  1084  		return;
20f6cd730 David Herrmann 2014-12-29  1085  
c01d50d18 Jiri Kosina    2007-08-20  1086  	/* report the usage code as scancode if the key status has changed */
c01d50d18 Jiri Kosina    2007-08-20 @1087  	if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
c01d50d18 Jiri Kosina    2007-08-20  1088  		input_event(input, EV_MSC, MSC_SCAN, usage->hid);
1fe8736da Jiri Kosina    2007-08-09  1089  
dde5845a5 Jiri Kosina    2006-12-08  1090  	input_event(input, usage->type, usage->code, value);
dde5845a5 Jiri Kosina    2006-12-08  1091  
dde5845a5 Jiri Kosina    2006-12-08  1092  	if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
dde5845a5 Jiri Kosina    2006-12-08  1093  		input_event(input, usage->type, usage->code, 0);
dde5845a5 Jiri Kosina    2006-12-08  1094  }
dde5845a5 Jiri Kosina    2006-12-08  1095  

:::::: The code at line 1087 was first introduced by commit
:::::: c01d50d181f074a60bf3ed54eb055ce1679afb98 HID: Report usage codes of keys as EV_MSC scancode events

:::::: TO: Jiri Kosina <jkosina@xxxxxxx>
:::::: CC: Jiri Kosina <jkosina@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]