diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 08:52:20 +1100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 08:52:20 +1100 |
commit | f4798748dee00c807a63f5518f08b3df161e0f6d (patch) | |
tree | 9b4c12712874de48c5ff1d437e584052bbec21f7 /drivers/hid/hid-core.c | |
parent | Merge branch 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block (diff) | |
parent | HID: ADS/Tech Radio si470x needs blacklist entry (diff) | |
download | linux-dev-f4798748dee00c807a63f5518f08b3df161e0f6d.tar.xz linux-dev-f4798748dee00c807a63f5518f08b3df161e0f6d.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (24 commits)
HID: ADS/Tech Radio si470x needs blacklist entry
HID: Logitech Extreme 3D needs NOGET quirk
HID: Refactor MS Presenter 8K key mapping
HID: MS Presenter mapping for PID 0x0701
HID: Support Samsung IR remote
HID: fix compilation of hidbp drivers without usbhid
HID: Blacklist the Gretag-Macbeth Huey display colorimeter
HID: the `bit' in hidinput_mapping_quirks() is an out parameter
HID: remove redundant WARN_ON()s in order not to scare users
HID: force hiddev creation for SONY PS3 controller
HID: Use hid blacklist in usbmouse/usbkbd
HID: proper handling of MS 4k and 6k devices
HID: remove unused variable in quirk event handler
HID: hid-input quirk for BTC 8193
HID: separate hid-input event quirks from generic code
HID: refactor mapping to input subsystem for quirky devices
HID: Microsoft Wireless Optical Desktop 3.0 quirk
HID: Add support for Logitech Elite keyboards
HID: add full support for Genius KB-29E
HID: fix a potential bug in pointer casting
...
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 2884b036495a..d73a768e176e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -26,6 +26,7 @@ #include <linux/input.h> #include <linux/wait.h> #include <linux/vmalloc.h> +#include <linux/sched.h> #include <linux/hid.h> #include <linux/hiddev.h> @@ -758,7 +759,9 @@ static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n) { u64 x; - WARN_ON(n > 32); + if (n > 32) + printk(KERN_WARNING "HID: extract() called with n (%d) > 32! (%s)\n", + n, current->comm); report += offset >> 3; /* adjust byte index */ offset &= 7; /* now only need bit offset into one byte */ @@ -780,8 +783,13 @@ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u3 __le64 x; u64 m = (1ULL << n) - 1; - WARN_ON(n > 32); + if (n > 32) + printk(KERN_WARNING "HID: implement() called with n (%d) > 32! (%s)\n", + n, current->comm); + if (value > m) + printk(KERN_WARNING "HID: implement() called with too large value %d! (%s)\n", + value, current->comm); WARN_ON(value > m); value &= m; |