diff mbox series

net: dsa: mv88e6xxx: global2: Fix gcc compile error

Message ID 1573129568-94008-1-git-send-email-chenwandun@huawei.com
State Not Applicable
Delegated to: David Miller
Headers show
Series net: dsa: mv88e6xxx: global2: Fix gcc compile error | expand

Commit Message

Chen Wandun Nov. 7, 2019, 12:26 p.m. UTC
In commit c5f299d59261 ("net: dsa: mv88e6xxx: global1_atu: Add helper for
get next"), it add a parameter in mv88e6xxx_g2_atu_stats_get only when
CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 enabled, it also should make the same
change when CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 disabled.

drivers/net/dsa/mv88e6xxx/chip.c: In function mv88e6xxx_devlink_atu_bin_get:
drivers/net/dsa/mv88e6xxx/chip.c:2752:8: error: too many arguments to function mv88e6xxx_g2_atu_stats_get
  err = mv88e6xxx_g2_atu_stats_get(chip, &occupancy);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/dsa/mv88e6xxx/chip.c:36:0:
drivers/net/dsa/mv88e6xxx/global2.h:535:19: note: declared here
 static inline int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [drivers/net/dsa/mv88e6xxx/chip.o] Error 1

Fixes: c5f299d59261 ("net: dsa: mv88e6xxx: global1_atu: Add helper for get next")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
 drivers/net/dsa/mv88e6xxx/global2.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andrew Lunn Nov. 7, 2019, 1:10 p.m. UTC | #1
On Thu, Nov 07, 2019 at 08:26:07PM +0800, Chen Wandun wrote:
> In commit c5f299d59261 ("net: dsa: mv88e6xxx: global1_atu: Add helper for
> get next"), it add a parameter in mv88e6xxx_g2_atu_stats_get only when
> CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 enabled, it also should make the same
> change when CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 disabled.

Hi Chen

Thanks for the report. A fix was merged last night.

       Andrew
diff mbox series

Patch

diff --git a/drivers/net/dsa/mv88e6xxx/global2.h b/drivers/net/dsa/mv88e6xxx/global2.h
index d80ad20..1f42ee6 100644
--- a/drivers/net/dsa/mv88e6xxx/global2.h
+++ b/drivers/net/dsa/mv88e6xxx/global2.h
@@ -532,7 +532,8 @@  static inline int mv88e6xxx_g2_atu_stats_set(struct mv88e6xxx_chip *chip,
 	return -EOPNOTSUPP;
 }
 
-static inline int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip)
+static inline int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip,
+					     u16 *stats)
 {
 	return -EOPNOTSUPP;
 }