Re: [GIT PATCH] HID and USB HID update for 2.6.21-rc2



On Wed, 28 Feb 2007, Linus Torvalds wrote:

There is no excuse for putting a large array in a header file and
including it millions of times. Or even just twice. The point of a
header file is to *declare* things, not to have big data structures in.

The point was that noone else than hid/hid-core.c would ever be going to
include this header with blacklist. The blacklist is growing in time quite
rapidly and having it in the middle of the code just didn't look pretty -
currently you have to perform some scrolling effort just to skip from
usbhid_init_reports() to hid_find_max_report(), which just looks very sad
to me.

But OK, I will leave it in there.

--
Jiri Kosina
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Exported function mangaled name
    ... that header file; it must be declared as __declspec ... You have to declare the function the same way in your .cpp file as in ... #define LIBSPEC __declspec ... See my essay on The Ultimate DLL Header File on my MVP Tips site. ...
    (microsoft.public.vc.mfc)
  • Re: make general windows module
    ... The VB version of these declarations is the "Declare Statement". ... mimicing the behavior of a "windows.h" header file for VB. ... not all Windows API calls can be called from VB as some use reference ...
    (microsoft.public.vb.general.discussion)
  • Re: confused about extern use
    ... going to achieve by declaring it as extern in the header file a.h. ... composed on one or more compilation units. ... Essentially you *declare* the type wherever it is ...
    (comp.lang.c)
  • Re: Trouble with FILE
    ... reasons I had to split up this program in several modules. ... I can declare, ... extern FILE *fp1; ... included in the header file, so that the FILE type is defined. ...
    (comp.lang.c)
  • Re-forward declaration of types which were already forward declared
    ... Is it a good style to re-forward declare the types, ... forward declared in base header file, in derived class header file? ...
    (comp.lang.cpp)