From patchwork Fri Sep 2 11:11:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rami Rosen X-Patchwork-Id: 665177 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sQc0C173Tz9sBg for ; Fri, 2 Sep 2016 21:12:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753972AbcIBLMG (ORCPT ); Fri, 2 Sep 2016 07:12:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:6426 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753963AbcIBLME (ORCPT ); Fri, 2 Sep 2016 07:12:04 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 02 Sep 2016 04:12:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,270,1470726000"; d="scan'208";a="1044847852" Received: from imail001.iil.intel.com ([10.184.207.12]) by orsmga002.jf.intel.com with ESMTP; 02 Sep 2016 04:12:03 -0700 Received: from rr.iil.intel.com (rr.iil.intel.com [143.185.141.66]) by imail001.iil.intel.com with ESMTP id u82BBxC8022702; Fri, 2 Sep 2016 14:11:59 +0300 From: Rami Rosen To: davem@davemloft.net Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com, eric.dumazet@gmail.com, wkok@cumulusnetworks.com, Rami Rosen Subject: [PATCH net-next] switchdev: Fix return value of switchdev_port_fdb_dump(). Date: Fri, 2 Sep 2016 14:11:57 +0300 Message-Id: <1472814717-11339-1-git-send-email-rami.rosen@intel.com> X-Mailer: git-send-email 2.5.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Reported-by: Eric Dumazet --- 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,