]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning
authorJeff Johnson <quic_jjohnson@quicinc.com>
Sun, 16 Jun 2024 20:01:48 +0000 (13:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 18 Jun 2024 01:05:38 +0000 (18:05 -0700)
commit0d9bb144276edfb53d61bd0b42788568b19bc718
tree87879f2641c06d883e40d72a9bd06228f6ebb4b5
parente275e19c918b502aa4534e56dc2e25b5095e9005
net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning

With ARCH=hexagon, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/synopsys/dwc-xlgmac.o

With most other ARCH settings the MODULE_DESCRIPTION() is provided by
the macro invocation in dwc-xlgmac-pci.c. However, for hexagon, the
PCI bus is not enabled, and hence CONFIG_DWC_XLGMAC_PCI is not set.
As a result, dwc-xlgmac-pci.c is not compiled, and hence is not linked
into dwc-xlgmac.o.

To avoid this issue, relocate the MODULE_DESCRIPTION() and other
related macros from dwc-xlgmac-pci.c to dwc-xlgmac-common.c, since
that file already has an existing MODULE_LICENSE() and it is
unconditionally linked into dwc-xlgmac.o.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240616-md-hexagon-drivers-net-ethernet-synopsys-v1-1-55852b60aef8@quicinc.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c