]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Input: evdev - fix printf() format for sizeof
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tue, 19 Aug 2008 15:28:23 +0000 (11:28 -0400)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 19 Aug 2008 15:35:27 +0000 (11:35 -0400)
commit f2afa7711f8585ffc088ba538b9a510e0d5dca12 ("Input: paper over a bug in
Synaptics X driver") introduced a compiler warning on 64-bit platforms, as
sizeof() returns a size_t, not an (unsigned) int:

| drivers/input/evdev.c: In function 'handle_eviocgbit':
| drivers/input/evdev.c:684: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Use the proper `z' modifier for size_t, and make the printf() formats for the
sizes unsigned while we're at it.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/evdev.c

index a92d81567559ba9fb59508628fdba56a0b7405bb..3524bef62be654910ec23ca5c917787269a6b018 100644 (file)
@@ -677,8 +677,8 @@ static int handle_eviocgbit(struct input_dev *dev, unsigned int cmd, void __user
                len = OLD_KEY_MAX;
                if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000))
                        printk(KERN_WARNING
-                               "evdev.c(EVIOCGBIT): Suspicious buffer size %d, "
-                               "limiting output to %d bytes. See "
+                               "evdev.c(EVIOCGBIT): Suspicious buffer size %u, "
+                               "limiting output to %zu bytes. See "
                                "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n",
                                OLD_KEY_MAX,
                                BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long));