linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c: 2 * bad shift ?

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

 



hello there,

1.

[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:2297] -> [linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3694]: (warning) Shifting 32-bit value by 51 bits is undefined behaviour. See condition at line 3694.

Source code at line 2297 is

    if (hotkey_user_mask & (1 << scancode))

and at 3694 is

    if (scancode> 0 && scancode <= TPACPI_HOTKEY_MAP_LEN) {

Maybe new code

    if (hotkey_user_mask & (1UL << scancode))

is better.

2.

[linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3696] -> [linux-4.4-rc8/drivers/platform/x86/thinkpad_acpi.c:3694]: (warning) Shifting 32-bit value by 51 bits is undefined behaviour. See condition at line 3694.

Duplicate.

Regards

David Binderman
 		 	   		  
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux