From: Chen Wandun <chenwandun@huawei.com>
To: <andrew@lunn.ch>, <vivien.didelot@gmail.com>,
<f.fainelli@gmail.com>, <davem@davemloft.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <chenwandun@huawei.com>
Subject: [PATCH] net: dsa: mv88e6xxx: global2: Fix gcc compile error
Date: Thu, 7 Nov 2019 20:26:07 +0800 [thread overview]
Message-ID: <1573129568-94008-1-git-send-email-chenwandun@huawei.com> (raw)
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(-)
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
next reply other threads:[~2019-11-07 12:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 12:26 Chen Wandun [this message]
2019-11-07 13:10 ` [PATCH] net: dsa: mv88e6xxx: global2: Fix gcc compile error Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1573129568-94008-1-git-send-email-chenwandun@huawei.com \
--to=chenwandun@huawei.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).