From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu Subject: Re: [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump(). Date: Fri, 02 Sep 2016 06:11:38 -0700 Message-ID: <57C97A8A.2090203@cumulusnetworks.com> References: <1472814717-11339-1-git-send-email-rami.rosen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, netdev@vger.kernel.org, eric.dumazet@gmail.com, wkok@cumulusnetworks.com To: Rami Rosen Return-path: Received: from mail-pa0-f42.google.com ([209.85.220.42]:36745 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbcIBNLk (ORCPT ); Fri, 2 Sep 2016 09:11:40 -0400 Received: by mail-pa0-f42.google.com with SMTP id fu3so32628731pad.3 for ; Fri, 02 Sep 2016 06:11:40 -0700 (PDT) In-Reply-To: <1472814717-11339-1-git-send-email-rami.rosen@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 > --- Acked-by: Roopa Prabhu 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,