diff options
author | Rosen, Rami <rami.rosen@intel.com> | 2016-09-02 14:11:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-02 21:00:21 +0300 |
commit | dd19bde36739702bbd9a832b5d4995bc0fa8d6d7 (patch) | |
tree | e73d25e2e7a362d5c7bb0778201a98f88e65c541 /include/net/switchdev.h | |
parent | 4df20483ab287b24a7ffe38e53d473880de3dd98 (diff) | |
download | linux-dd19bde36739702bbd9a832b5d4995bc0fa8d6d7.tar.xz |
switchdev: Fix return value of switchdev_port_fdb_dump().
This patch fixes the retun value of switchdev_port_fdb_dump() when
CONFIG_NET_SWITCHDEV is not set. This avoids getting "warning: return makes
integer from pointer without a cast [-Wint-conversion]" when building
when CONFIG_NET_SWITCHDEV is not set under several compiler versions.
This warning is due to commit d297653dd6f07afbe7e6c702a4bcd7615680002e
("rtnetlink: fdb dump: optimize by saving last interface markers").
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r-- | include/net/switchdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 6279f2f179ec..729fe1534160 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -344,7 +344,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb, struct net_device *filter_dev, int *idx) { - return idx; + return *idx; } static inline bool switchdev_port_same_parent_id(struct net_device *a, |