Thread (72 messages) 72 messages, 9 authors, 2021-08-05

Re: [PATCH 06/14] peci: Add core infrastructure

From: Dan Williams <hidden>
Date: 2021-07-17 20:55:25
Also in: linux-aspeed, linux-devicetree, linux-doc, linux-hwmon, lkml, openbmc

On Fri, Jul 16, 2021 at 11:13 PM gregkh@linuxfoundation.org
[off-list ref] wrote:
On Fri, Jul 16, 2021 at 02:50:04PM -0700, Dan Williams wrote:
quoted
On Fri, Jul 16, 2021 at 2:08 PM Winiarska, Iwona
quoted
quoted
quoted
+}
+EXPORT_SYMBOL_NS_GPL(peci_controller_add, PECI);
I think it's cleaner to declare symbol namespaces in the Makefile. In
this case, add:

cflags-y += -DDEFAULT_SYMBOL_NAMESPACE=PECI

...and just use EXPORT_SYMBOL_GPL as normal in the C file.
I kind of prefer the more verbose EXPORT_SYMBOL_NS_GPL - it also
doesn't "hide" the fact that we're using namespaces (everything is in
the C file rather than mixed into Makefile), but it's not a strong
opinion, so sure - I can change this.
Perhaps as a tie breaker, the maintainer you are submitting this to,
Greg, uses the -DDEFAULT_SYMBOL_NAMESPACE scheme in his subsystem,
drivers/usb/.
We did that because namespaces were added _after_ the kernel code was
already there.  For new code like this, the original use of
EXPORT_SYMBOL_NS_GPL() is best as it is explicit and obvious.  No need
to dig around in a Makefile to find out the namespace name.
Fair enough.

/me goes to update drivers/cxl/

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help