linux/drivers/hid
Bruno Prémont 8c4e708d01 HID: picolcd: Avoid compile warning/error triggered by copy_from_user()
With CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y compilation of PicoLCD
driver fails on copy_from_user(), without it a warning is generated:

  CC [M]  drivers/hid/hid-picolcd.o
In file included from /usr/src/linux-2.6/arch/x86/include/asm/uaccess.h:571,
                 from /usr/src/linux-2.6/arch/x86/include/asm/sections.h:5,
                 from /usr/src/linux-2.6/arch/x86/include/asm/hw_irq.h:26,
                 from /usr/src/linux-2.6/include/linux/irq.h:359,
                 from /usr/src/linux-2.6/arch/x86/include/asm/hardirq.h:5,
                 from /usr/src/linux-2.6/include/linux/hardirq.h:7,
                 from /usr/src/linux-2.6/include/linux/interrupt.h:12,
                 from /usr/src/linux-2.6/include/linux/usb.h:15,
                 from /usr/src/linux-2.6/drivers/hid/hid-picolcd.c:25:
In function 'copy_from_user',
    inlined from 'picolcd_debug_eeprom_write' at drivers/hid/hid-picolcd.c:1592:
arch/x86/include/asm/uaccess_32.h:212: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

gcc-4.4.5 is not able to track size calculation when it is stored into
a variable, thus tell copy_from_user() maximum size via
min(*max-size*, *effective-size*) explicitly and inline how much to copy
at most.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-05 13:45:52 +02:00
..
usbhid HID: hiddev: fix brace indent 2011-03-27 11:14:40 +02:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2011-03-18 10:35:30 -07:00
Makefile Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
hid-3m-pct.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2011-01-10 08:15:37 -08:00
hid-a4tech.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-apple.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-axff.c HID: ACRUX - activate the device immediately after binding 2011-03-12 21:47:18 +01:00
hid-belkin.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-cando.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2011-01-13 09:58:38 -08:00
hid-cherry.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-chicony.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-core.c Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
hid-cypress.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-debug.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-dr.c HID: add support for DragonRise PID 0011 gamepad 2011-02-01 11:01:06 +01:00
hid-elecom.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-emsff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-ezkey.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-gaff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-gyration.c HID: Add teletext/color keys - gyration remote - EU version (GYAR3101CKDE) 2011-02-15 10:29:57 +01:00
hid-ids.h Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
hid-input.c Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
hid-kensington.c HID: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-keytouch.c HID: add support for Keytouch IEC 60945 2011-02-17 15:12:45 +01:00
hid-kye.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lcpower.c HID: hid-lcpower: fix key mapping 2011-02-13 15:04:51 +01:00
hid-lg.c HID: add support for Logitech Driving Force Pro wheel 2011-03-17 00:43:23 +01:00
hid-lg.h HID: Add support for Logitech Speed Force Wireless gaming wheel 2010-09-22 13:25:39 +02:00
hid-lg2ff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lg3ff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lg4ff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lgff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-magicmouse.c HID: hid-magicmouse: Correct touch orientation direction 2011-03-10 00:05:59 +01:00
hid-microsoft.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-monterey.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-mosart.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2011-01-13 09:58:38 -08:00
hid-multitouch.c Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
hid-ntrig.c HID: hid-ntrig: init settle and mode check 2011-03-14 13:10:13 +01:00
hid-ortek.c HID: hid-ortek: remove spurious reference 2011-03-17 00:39:33 +01:00
hid-petalynx.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-picolcd.c HID: picolcd: Avoid compile warning/error triggered by copy_from_user() 2011-05-05 13:45:52 +02:00
hid-pl.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-prodikeys.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-quanta.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-roccat-arvo.c HID: roccat: Rename header roccat.h -> hid-roccat.h 2011-02-03 16:37:28 +01:00
hid-roccat-arvo.h HID: roccat: Add support for Roccat Arvo keyboard 2011-01-20 11:27:54 +01:00
hid-roccat-common.c HID: roccat: Introduce module hid-roccat-common 2011-02-03 16:37:27 +01:00
hid-roccat-common.h HID: roccat: Introduce module hid-roccat-common 2011-02-03 16:37:27 +01:00
hid-roccat-kone.c HID: roccat: Rename header roccat.h -> hid-roccat.h 2011-02-03 16:37:28 +01:00
hid-roccat-kone.h HID: roccat: don't use #pragma pack 2011-01-08 01:18:35 +01:00
hid-roccat-koneplus.c HID: roccat-koneplus: vorrect mode of sysfs attr 'sensor' 2011-03-15 15:41:20 +01:00
hid-roccat-koneplus.h HID: roccat: don't use #pragma pack 2011-01-08 01:18:35 +01:00
hid-roccat-kovaplus.c HID: roccat: Rename header roccat.h -> hid-roccat.h 2011-02-03 16:37:28 +01:00
hid-roccat-kovaplus.h HID: roccat: Add support for Kova[+] mouse 2011-02-03 16:37:27 +01:00
hid-roccat-pyra.c HID: roccat: Rename header roccat.h -> hid-roccat.h 2011-02-03 16:37:28 +01:00
hid-roccat-pyra.h HID: roccat: don't use #pragma pack 2011-01-08 01:18:35 +01:00
hid-roccat.c HID: roccat: Rename header roccat.h -> hid-roccat.h 2011-02-03 16:37:28 +01:00
hid-samsung.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-sjoy.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-sony.c HID: hid-sony.c: Fix sending Output reports to the Sixaxis 2011-02-21 13:48:50 +01:00
hid-stantum.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-sunplus.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-tmff.c Merge branch 'master' into upstream 2010-12-10 15:19:18 +01:00
hid-topseed.c HID: Add support for Perixx PERIBOARD-707 (Plus) 2010-11-25 15:59:02 +01:00
hid-twinhan.c HID: add __init/__exit macros to twinhan.c 2009-09-29 13:58:20 +02:00
hid-uclogic.c HID: uclogic: add proper support for PF1209 2010-08-23 15:08:42 +02:00
hid-wacom.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-waltop.c HID: waltop: add support for Waltop Slim Tablet 12.1 inch 2010-10-01 15:34:05 +02:00
hid-zpff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-zydacron.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hidraw.c HID: hidraw: fix comments 2011-03-27 20:30:32 +02:00