lkml.org 
[lkml]   [2012]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] HID: microsoft, fix invalid rdesc for 3k kbd
From
On Sun, Nov 4, 2012 at 11:37 PM, Jiri Slaby <jslaby@suse.cz> wrote:
> On 11/04/2012 10:06 PM, Geert Uytterhoeven wrote:
>> On Fri, Oct 19, 2012 at 1:28 PM, Jiri Slaby <jslaby@suse.cz> wrote:
>>> + if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
>>> + !memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
>>> + &rdesc[94], 4)) {
>>
>> Which version of gcc are you using?
>
> 4.7.1. But that indeed fails too if memcmp is a macro. This is of course
> not the case for x86, so that I didn't hit that. I will post a patch to
> change this to standard array accesses. (This looked prettier though.)

BTW, you also have to add

#include <linux/string.h>

as on some configs, I get

drivers/hid/hid-microsoft.c:50: error: ‘memcmp’ undeclared (first use
in this function)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-11-11 18:21    [W:0.053 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site