diff mbox series

net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning

Message ID 20240616-md-hexagon-drivers-net-ethernet-synopsys-v1-1-55852b60aef8@quicinc.com (mailing list archive)
State Accepted
Commit 0d9bb144276edfb53d61bd0b42788568b19bc718
Delegated to: Netdev Maintainers
Headers show
Series net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 845 this patch: 845
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 849 this patch: 849
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 849 this patch: 849
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-06-17--03-00 (tests: 657)

Commit Message

Jeff Johnson June 16, 2024, 8:01 p.m. UTC
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>
---
 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 7 +++++--
 drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c    | 5 -----
 2 files changed, 5 insertions(+), 7 deletions(-)


---
base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
change-id: 20240616-md-hexagon-drivers-net-ethernet-synopsys-ec77b35f1a9a

Comments

Jiri Pirko June 17, 2024, 11:04 a.m. UTC | #1
Sun, Jun 16, 2024 at 10:01:48PM CEST, quic_jjohnson@quicinc.com wrote:
>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>

Looks okay. Missing "Fixes" tag though. Please add it and send v2.
Also, please make obvious what tree you target using "[PATCH net]"
prefix.

Thanks.

pw-bot: cr
Jakub Kicinski June 18, 2024, 12:14 a.m. UTC | #2
On Mon, 17 Jun 2024 13:04:53 +0200 Jiri Pirko wrote:
> Looks okay. Missing "Fixes" tag though. Please add it and send v2.
> Also, please make obvious what tree you target using "[PATCH net]"
> prefix.

I've been applying these to net-next lately, TBH.
Judging by the number of these warnings still left in the tree we are
the only ones who care.
patchwork-bot+netdevbpf@kernel.org June 18, 2024, 1:10 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 16 Jun 2024 13:01:48 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning
    https://git.kernel.org/netdev/net-next/c/0d9bb144276e

You are awesome, thank you!
Jeff Johnson June 20, 2024, 11:41 p.m. UTC | #4
On 6/17/2024 5:14 PM, Jakub Kicinski wrote:
> On Mon, 17 Jun 2024 13:04:53 +0200 Jiri Pirko wrote:
>> Looks okay. Missing "Fixes" tag though. Please add it and send v2.
>> Also, please make obvious what tree you target using "[PATCH net]"
>> prefix.
> 
> I've been applying these to net-next lately, TBH.
> Judging by the number of these warnings still left in the tree we are
> the only ones who care.

I'm trying to get rid of these tree-wide.
Hope I'm not just tilting at windmills...
Jakub Kicinski June 21, 2024, 2:03 a.m. UTC | #5
On Thu, 20 Jun 2024 16:41:04 -0700 Jeff Johnson wrote:
> > I've been applying these to net-next lately, TBH.
> > Judging by the number of these warnings still left in the tree we are
> > the only ones who care.  
> 
> I'm trying to get rid of these tree-wide.
> Hope I'm not just tilting at windmills...

Not at all, it's a lot of work but new ones don't get added very often
so there's a light at the end of the tunnel..
It'd be great if an incremental W=1 build didn't spit out 400+ warnings.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-common.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
index f8e133604146..131786aa4d5b 100644
--- a/drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
+++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
@@ -21,8 +21,6 @@ 
 #include "dwc-xlgmac.h"
 #include "dwc-xlgmac-reg.h"
 
-MODULE_LICENSE("Dual BSD/GPL");
-
 static int debug = -1;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "DWC ethernet debug level (0=none,...,16=all)");
@@ -725,3 +723,8 @@  void xlgmac_print_all_hw_features(struct xlgmac_pdata *pdata)
 	XLGMAC_PR("=====================================================\n");
 	XLGMAC_PR("\n");
 }
+
+MODULE_DESCRIPTION(XLGMAC_DRV_DESC);
+MODULE_VERSION(XLGMAC_DRV_VERSION);
+MODULE_AUTHOR("Jie Deng <jiedeng@synopsys.com>");
+MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c
index fa8604d7b797..36fe538e3332 100644
--- a/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c
+++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c
@@ -71,8 +71,3 @@  static struct pci_driver xlgmac_pci_driver = {
 };
 
 module_pci_driver(xlgmac_pci_driver);
-
-MODULE_DESCRIPTION(XLGMAC_DRV_DESC);
-MODULE_VERSION(XLGMAC_DRV_VERSION);
-MODULE_AUTHOR("Jie Deng <jiedeng@synopsys.com>");
-MODULE_LICENSE("Dual BSD/GPL");