On Sat, 28 Dec 2024 23:38:49 +0200 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > On Sat, Dec 28, 2024 at 06:43:28PM +0000, David Laight wrote: > > Commit ceb8bf2ceaa77 ("module: Convert default symbol namespace to string > > literal") changed DEFAULT_SYMBOL_NAMESPACE to be a string literal. > > However the conditional definition of _EXPORT_SYMBOL() was left in. > > > > Instead just default DEFAULT_SYMBOL_NAMESPACE to "" and remove the > > extra _EXPORT_SYMBOL() wrapper. > > > > This lets DEFAULT_SYMBOL_NAMESPACE be defined after export.h is included. > > > Fixes fd57a3325a779 ("i2c: designware: Move exports to I2C_DW namespaces") > > Incorrect format, and this should be a tag. Except that it doesn't want to be picked up by the back-port bots. At least not in this form - since the changes to export.h that remove the __stringify() don't really want back-porting. > > ... > > This patch in a different form had been already submitted by Uwe. Did that move the DEFAULT_SYMBOL_NAMESPACE define to the top of the file? That can be back-ported provided the " are removed. The simplification to export.h (which is what I was trying to do) can then be done after the other patches. > So, guys, fix > the documentation or clarify it and when you agree on the approach, choose the > patch to review. No Ack till that. Andi, FYI. > I had another thought overnight - which is more changes. Instead of using DEFAULT_SYMBOL_NAMESPACE in EXPORT_SYMBOL() use it as a default for EXPORT_SYMBOL_NS(). So you have something like: #define EXPORT_SYMBOL_NS(sym, ...) _EXPORT_SYMBOL_NS(sym, __VA_ARGS__, DEFAULT_SYMBOL_NAMESPACE) #define _EXPORT_SYMBOL_NS(sym, ns, ...) __EXPORT_SYMBOL(sym, "", ns) That requires that all the EXPORT_SYMBOL(sym) in files that define DEFAULT_SYMBOL_NAMESPACE be changed to EXPORT_SYMBOL_NS(sym). But it doesn't require a default definition of DEFAULT_SYMBOL_NAMESPACE and lets it be defined in a more obvious part of the source file. David