Re: [PATCH 3/3] module: Convert default symbol namespace to string literal

From: Uwe Kleine-König
Date: Tue Dec 03 2024 - 06:12:58 EST


Hello Masahiro,

On Tue, Dec 03, 2024 at 07:21:07PM +0900, Masahiro Yamada wrote:
> Commit cdd30ebb1b9f ("module: Convert symbol namespace to string
> literal") only converted MODULE_IMPORT_NS() and EXPORT_SYMBOL_NS(),
> leaving DEFAULT_SYMBOL_NAMESPACE as a macro expansion.
>
> This commit converts DEFAULT_SYMBOL_NAMESPACE in the same way to
> avoid annoyance for the default namespace as well.
>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>

You were quicker than me, I'm still in the build test phase of a very
similar patch.

> diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/core-api/symbol-namespaces.rst
> index 55886b4e6aea..27a9cccc792c 100644
> --- a/Documentation/core-api/symbol-namespaces.rst
> +++ b/Documentation/core-api/symbol-namespaces.rst
> @@ -68,7 +68,7 @@ is to define the default namespace in the ``Makefile`` of the subsystem. E.g. to
> export all symbols defined in usb-common into the namespace USB_COMMON, add a

I added quotes around USB_COMMON here --------------------------^, too
(and in the translated variants).

> line like this to drivers/usb/common/Makefile::
>
> - ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=USB_COMMON
> + ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE='"USB_COMMON"'

And I used

-DDEFAULT_SYMBOL_NAMESPACE=\"USB_COMMON\"

which is probably just subjective.

Independant of the above:

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature