lkml.org 
[lkml]   [2008]   [May]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2 26/28] firmware: allow firmware files to be built into kernel image
FromDavid Woodhouse <>
DateSat, 31 May 2008 11:39:23 +0300
On Fri, 2008-05-30 at 15:08 +1000, Rusty Russell wrote:
> 
> > +/* We have to play tricks here much like stringify() to get the
> > +   __COUNTER__ macro to be expanded as we want it */
> > +#define __fw_concat1(x,y) x##y
> > +#define __fw_concat(x,y) __fw_concat1(x,y)
> 
> Hmm, linux/module.h does this too, perhaps some enthusiast can implement 
> __concat() and use it everywhere.

Took me a while to find that... in moduleparam.h :)

Yeah, it probably makes sense to split it out, and probably add a
'uniquify' macro which properly appends __COUNTER__ to some string; PCI
fixup declarations could do with that too. I'll probably just add them
to stringify.h -- I don't think they each justify separate files of
their own. It's all just CPP magic.

Although I was actually going to drop DECLARE_BUILTIN_FIRMWARE. I'm not
doing that from C code at all any more -- it's all in asm. At this
point, it only really serves as documentation for that one patch in the
series (and yes, it's scary that such a construct really does give
people more of a clue what's going on).

-- 
dwmw2



\
 
 \ /
  Last update: 2008-05-31 10:43    [from the cache]
©2003-2008