lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1573129568-94008-1-git-send-email-chenwandun@huawei.com>
Date:   Thu, 7 Nov 2019 20:26:07 +0800
From:   Chen Wandun <chenwandun@...wei.com>
To:     <andrew@...n.ch>, <vivien.didelot@...il.com>,
        <f.fainelli@...il.com>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <chenwandun@...wei.com>
Subject: [PATCH] net: dsa: mv88e6xxx: global2: Fix gcc compile error

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@...wei.com>
Signed-off-by: Chen Wandun <chenwandun@...wei.com>
---
 drivers/net/dsa/mv88e6xxx/global2.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 }
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ