netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump().
@ 2016-09-02 11:11 Rami Rosen
  2016-09-02 13:11 ` Roopa Prabhu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rami Rosen @ 2016-09-02 11:11 UTC (permalink / raw)
  To: davem; +Cc: netdev, roopa, eric.dumazet, wkok, Rami Rosen

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>
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 6279f2f..729fe15 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,
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump().
  2016-09-02 11:11 [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump() Rami Rosen
@ 2016-09-02 13:11 ` Roopa Prabhu
  2016-09-02 13:48 ` Eric Dumazet
  2016-09-02 18:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Roopa Prabhu @ 2016-09-02 13:11 UTC (permalink / raw)
  To: Rami Rosen; +Cc: davem, netdev, eric.dumazet, wkok

On 9/2/16, 4:11 AM, Rami Rosen wrote:
> 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>

Thanks Rami.
>  include/net/switchdev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/switchdev.h b/include/net/switchdev.h
> index 6279f2f..729fe15 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,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump().
  2016-09-02 11:11 [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump() Rami Rosen
  2016-09-02 13:11 ` Roopa Prabhu
@ 2016-09-02 13:48 ` Eric Dumazet
  2016-09-02 18:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2016-09-02 13:48 UTC (permalink / raw)
  To: Rami Rosen; +Cc: davem, netdev, roopa, wkok

On Fri, 2016-09-02 at 14:11 +0300, Rami Rosen wrote:
> 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>
> ---
>  include/net/switchdev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/switchdev.h b/include/net/switchdev.h
> index 6279f2f..729fe15 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,


Thanks a lot Rami !

Reported-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump().
  2016-09-02 11:11 [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump() Rami Rosen
  2016-09-02 13:11 ` Roopa Prabhu
  2016-09-02 13:48 ` Eric Dumazet
@ 2016-09-02 18:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-09-02 18:00 UTC (permalink / raw)
  To: rami.rosen; +Cc: netdev, roopa, eric.dumazet, wkok

From: Rami Rosen <rami.rosen@intel.com>
Date: Fri,  2 Sep 2016 14:11:57 +0300

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-02 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02 11:11 [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump() Rami Rosen
2016-09-02 13:11 ` Roopa Prabhu
2016-09-02 13:48 ` Eric Dumazet
2016-09-02 18:00 ` David Miller

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).