diff mbox series

[net-next] net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops

Message ID E1rxPMP-007f9I-Qq@rmk-PC.armlinux.org.uk (mailing list archive)
State Accepted
Commit 9fc31a9251de4acaab2d0704450d70ddc99f5ea2
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for 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: 927 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 939 this patch: 937
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: 938 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 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-04-19--00-00 (tests: 961)

Commit Message

Russell King (Oracle) April 18, 2024, 10:51 a.m. UTC
The kernel build bot identified the following mistake in the recently
merged 860a9bed2651 ("net: dsa: xrs700x: provide own phylink MAC
operations") patch:

drivers/net/dsa/xrs700x/xrs700x.c:714:37: warning: 'xrs700x_phylink_mac_ops' defined but not used [-Wunused-const-variable=]
     714 | static const struct phylink_mac_ops xrs700x_phylink_mac_ops = {
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~

Fix the omitted assignment of ds->phylink_mac_ops.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
Normal builds don't catch this, and W=1 produces 5.3klines of warnings,
so its pretty difficult to build-test changes such as these and have
confidence that they are correct. If anyone knows of a solution to
this problem...

 drivers/net/dsa/xrs700x/xrs700x.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+netdevbpf@kernel.org April 19, 2024, 11:20 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 18 Apr 2024 11:51:21 +0100 you wrote:
> The kernel build bot identified the following mistake in the recently
> merged 860a9bed2651 ("net: dsa: xrs700x: provide own phylink MAC
> operations") patch:
> 
> drivers/net/dsa/xrs700x/xrs700x.c:714:37: warning: 'xrs700x_phylink_mac_ops' defined but not used [-Wunused-const-variable=]
>      714 | static const struct phylink_mac_ops xrs700x_phylink_mac_ops = {
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops
    https://git.kernel.org/netdev/net-next/c/9fc31a9251de

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/xrs700x/xrs700x.c b/drivers/net/dsa/xrs700x/xrs700x.c
index 6605fa44bcf0..de3b768f2ff9 100644
--- a/drivers/net/dsa/xrs700x/xrs700x.c
+++ b/drivers/net/dsa/xrs700x/xrs700x.c
@@ -780,6 +780,7 @@  struct xrs700x *xrs700x_switch_alloc(struct device *base, void *devpriv)
 	INIT_DELAYED_WORK(&priv->mib_work, xrs700x_mib_work);
 
 	ds->ops = &xrs700x_ops;
+	ds->phylink_mac_ops = &xrs700x_phylink_mac_ops;
 	ds->priv = priv;
 	priv->dev = base;