switchdev: Fix return value of switchdev_port_fdb_dump().
Subsystems (3)
PATCH 1/1 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").
--- include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/switchdev.h +1 -1
@@ -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,
Signature · 1 line
2.5.5
Quoted 9 lines · Rami Rosen
This patch fixes the retun value of
switchdev_port_fdb_dump()whenCONFIG_NET_SWITCHDEVis not set. This avoids getting "warning: return makes integer from pointer without a cast [-Wint-conversion]" when building whenCONFIG_NET_SWITCHDEVis not set under several compiler versions. This warning is due to commitd297653dd6f07afbe7e6c702a4bcd7615680002e("rtnetlink: fdb dump: optimize by saving last interface markers").Signed-off-by Rami Rosen <[email protected]>---
Thanks Rami.
Quoted 16 lines
include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/net/switchdev.h +1
-1@@ -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,
Quoted 17 lines · Rami Rosen
This patch fixes the retun value of
switchdev_port_fdb_dump()whenCONFIG_NET_SWITCHDEVis not set. This avoids getting "warning: return makes integer from pointer without a cast [-Wint-conversion]" when building whenCONFIG_NET_SWITCHDEVis not set under several compiler versions. This warning is due to commitd297653dd6f07afbe7e6c702a4bcd7615680002e("rtnetlink: fdb dump: optimize by saving last interface markers").Signed-off-by Rami Rosen <[email protected]>--- include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/net/switchdev.h +0
-0
include/net/switchdev.h static inline int switchdev_port_fdb_dump(struct sk_buff *skb, · line 350
Quoted 8 lines
include/net/switchdev.h +1
-1@@ -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,
Thanks a lot Rami !
From: Rami Rosen <[email protected]>
Date: Fri, 2 Sep 2016 14:11:57 +0300
Quoted 8 lines
This patch fixes the retun value of
switchdev_port_fdb_dump()whenCONFIG_NET_SWITCHDEVis not set. This avoids getting "warning: return makes integer from pointer without a cast [-Wint-conversion]" when building whenCONFIG_NET_SWITCHDEVis not set under several compiler versions. This warning is due to commitd297653dd6f07afbe7e6c702a4bcd7615680002e("rtnetlink: fdb dump: optimize by saving last interface markers").Signed-off-by Rami Rosen <[email protected]>
Applied, thanks.