Re: [PATCHv2 26/28] firmware: allow firmware files to be builtinto kernel image

From: David Woodhouse
Date: Sat May 31 2008 - 04:40:09 EST


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

--
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/