On Wed, Sep 18, 2013 at 11:44:18AM -0700, Olof Johansson wrote:
Hrm, perhaps that was what was supposed to happen - have MODULE_DEVICE_TABLE() create the appropriate eliminateable static reference so the compiler can figure things out and we don't need the ifdefs. It'd certainly be nice to elimiante more of these ifdefs.
Easiest way to do that is probably to provide a new macro to declare the match tables with, that compiles out and/or gives appropriate attributes depending on what is enabled or not in the config. That gets rid of the ifdefs but we don't have anything like it today.
Yup.
I'm honestly not sure I think it's needed, the ifdef for the table doesn't bother me. But if people feel strongly about it then it's likely the best way forward.
For me it's not the tables per se, it's the general proliferation of options to get coverage on making things more error prone - the more things always get seen by the compiler the better. I'm not sure I care enough to actually do the work but it's nice when someone has done it.
Anyway Thierry sent the #ifdef version of the patch so this is sorted now.