[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWq9S9oO+2OH6oiAogFR+JJxnxrtGoMp+uMm-qXCLr55A@mail.gmail.com>
Date: Mon, 12 Nov 2012 13:30:25 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Jiri Kosina <jkosina@...e.cz>
Cc: Jiri Slaby <jslaby@...e.cz>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, jirislaby@...il.com
Subject: Re: [PATCH] HID: microsoft, do not use compound literal
On Mon, Nov 12, 2012 at 1:15 PM, Jiri Kosina <jkosina@...e.cz> wrote:
> On Mon, 12 Nov 2012, Geert Uytterhoeven wrote:
>> On Mon, Nov 12, 2012 at 10:16 AM, Jiri Slaby <jslaby@...e.cz> wrote:
>> > In patch "HID: microsoft: fix invalid rdesc for 3k kbd" I fixed
>> > support for MS 3k keyboards. However the added check using memcmp and
>> > a compound statement breaks build on architectures where memcmp is a
>> > macro with parameters. The error looks there like (m68k-linux-gnu-gcc
>> > 4.1.2):
>> > hid-microsoft.c:51:18: error: macro "memcmp" passed 6 arguments, but takes just 3
>> > hid-microsoft.c: In function ‘ms_report_fixup’:
>> > drivers/hid/hid-microsoft.c:50: error: ‘memcmp’ undeclared (first use in this function)
>> > hid-microsoft.c:50: error: (Each undeclared identifier is reported only once
>> > /hid-microsoft.c:50: error: for each function it appears in.)
>>
>> The above 3 lines were actually from a build with a different config
>> --- which I didn't
>> notice at that time --- where <linux/string.h> was not indirectly included.
>
> Still the patch needs string.h include addition, otherwise you still are
> able to come up with m68k config that doesn't build, do I understand it
> correctly?
No.
My comment was purely cosmetic, as it applies to the quoted compiler error
messages only.
Your latest version doesn't use memcmp() anymore, so I think there's no need to
include <linux/string.h> anymore.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists