Skip to content

Commit dd19bde

Browse files
Rosen, Ramidavem330
authored andcommitted
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 d297653 ("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>
1 parent 4df2048 commit dd19bde

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/net/switchdev.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb,
344344
struct net_device *filter_dev,
345345
int *idx)
346346
{
347-
return idx;
347+
return *idx;
348348
}
349349

350350
static inline bool switchdev_port_same_parent_id(struct net_device *a,

0 commit comments

Comments
 (0)