[{"id":1760624,"web_url":"http://patchwork.ozlabs.org/comment/1760624/","msgid":"<6D0042A3-C029-4CAC-86B1-F570E541D8C0@gmail.com>","list_archive_url":null,"date":"2017-08-31T03:59:55","subject":"Re: [PATCH net-next] net/ncsi: Define {add,\n\tkill}_vid callbacks for !CONFIG_NET_NCSI","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On August 30, 2017 8:38:46 PM PDT, Samuel Mendoza-Jonas <sam@mendozajonas.com> wrote:\n>Patch \"net/ncsi: Configure VLAN tag filter\" defined two new callback\n>functions in include/net/ncsi.h, but neglected the !CONFIG_NET_NCSI\n>case. This can cause a build error if these are referenced elsewhere\n>without NCSI enabled, for example in ftgmac100:\n>\n>>>> ERROR: \"ncsi_vlan_rx_kill_vid\"\n>[drivers/net/ethernet/faraday/ftgmac100.ko] undefined!\n>>>> ERROR: \"ncsi_vlan_rx_add_vid\"\n>[drivers/net/ethernet/faraday/ftgmac100.ko] undefined!\n>\n>Add definitions for !CONFIG_NET_NCSI to bring it into line with the\n>rest\n>of ncsi.h\n>\n>Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>\n>---\n> include/net/ncsi.h | 8 ++++++++\n> 1 file changed, 8 insertions(+)\n>\n>diff --git a/include/net/ncsi.h b/include/net/ncsi.h\n>index 1f96af46df49..2b13b6b91a4d 100644\n>--- a/include/net/ncsi.h\n>+++ b/include/net/ncsi.h\n>@@ -36,6 +36,14 @@ int ncsi_start_dev(struct ncsi_dev *nd);\n> void ncsi_stop_dev(struct ncsi_dev *nd);\n> void ncsi_unregister_dev(struct ncsi_dev *nd);\n> #else /* !CONFIG_NET_NCSI */\n>+int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16\n>vid)\n>+{\n>+\treturn -ENOTTY;\n\nReturning -EOPNOTSUPP would probably be more correct here.\n\n>+}\n>+int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16\n>vid)\n>+{\n>+\treturn -ENOTTY;\n\nLikewise.\n\n>+}\n>static inline struct ncsi_dev *ncsi_register_dev(struct net_device\n>*dev,\n> \t\t\t\t\tvoid (*notifier)(struct ncsi_dev *nd))\n> {","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjTDC2CWCz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 14:00:11 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjTDB2rwTzDqXc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 14:00:10 +1000 (AEST)","from mail-oi0-x243.google.com (mail-oi0-x243.google.com\n\t[IPv6:2607:f8b0:4003:c06::243])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjTD43WsFzDq5b\n\tfor <openbmc@lists.ozlabs.org>; Thu, 31 Aug 2017 14:00:03 +1000 (AEST)","by mail-oi0-x243.google.com with SMTP id r203so7202807oih.5\n\tfor <openbmc@lists.ozlabs.org>; Wed, 30 Aug 2017 21:00:03 -0700 (PDT)","from ?IPv6:2001:470:d:73f:10ca:f176:623b:9249?\n\t([2001:470:d:73f:10ca:f176:623b:9249])\n\tby smtp.gmail.com with ESMTPSA id\n\tm3sm7833903oif.17.2017.08.30.20.59.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 30 Aug 2017 20:59:59 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fTSxr493\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fTSxr493\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fTSxr493\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:user-agent:in-reply-to:references:mime-version\n\t:content-transfer-encoding:subject:to:cc:from:message-id;\n\tbh=uaxoGPM+1BmnC9oJLP/82CLGBze5aO0tiLEphLVN4xE=;\n\tb=fTSxr493wzaR2jSfl+lnCpwsmkUsfScm//HrVl9rmQyZWeTbdvvOAk84g2wkpe1jyH\n\tDfSeKuKajJg2WmGc0npQLkkgNU2FuYnkVc6OlYYP5qwee7Boqt9ON+XHwSR/YftAIm7Z\n\tp0BJ3xXpmHg1B2txvl4XDbf8BX7JqUekm8z8Qv32f3J3FUQFbriV/vovCEILIZk+A0Cp\n\tcfDm7CojZzz2KD33E+iaTy2Mau7jGIKPb69J51TPHUH/AAcbtz21PpxVQFUMZ/08FoyS\n\t/o8aUqc3jYR95TlfEhtUNuYiTNW+d33+TNQO7brpi4msrWYsmuyB6N+ybFWinHhdT6yr\n\tqMjw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:user-agent:in-reply-to:references\n\t:mime-version:content-transfer-encoding:subject:to:cc:from\n\t:message-id;\n\tbh=uaxoGPM+1BmnC9oJLP/82CLGBze5aO0tiLEphLVN4xE=;\n\tb=AdHKXZvJYF5IVZQjZBhDQh7G4Fwi0SsS59HiZIte5h4U6OKihvuSRkkbH2eY7ZetwS\n\t33qJfDCnQ9cmo7BlmZDx+1cxUWO9F+lNwq545xxEP+nvSE0leGHDxANzHI+UwFNrX8ON\n\t3HivGnUXPKGJAr0X0hQVhq71KZLWCprcD9PlPjHAtN3+nCB4kfZp6d7B7xECZwDQFwVR\n\tme37kBQSnQ6713TtXlEU4HrZT5CEIZzEa3D0a+ZtsKIeHqH2CPP6YjmVAFIbpQwhQqvc\n\tOiihohY3OKj0SxCTZlIDED3dDdFhk4ALtEd4tJJBtVNVuw/NiZf1OcJ2EULyDcCC92KN\n\tM5PQ==","X-Gm-Message-State":"AHYfb5h0fhUv7QmnEAK2PvdhvvihvsWbkf1HkG6AWw/k5YWU73nRCndj\n\tSYK6RYWH5EWqzQ==","X-Received":"by 10.202.4.6 with SMTP id 6mr3425822oie.114.1504152000245;\n\tWed, 30 Aug 2017 21:00:00 -0700 (PDT)","Date":"Wed, 30 Aug 2017 20:59:55 -0700","User-Agent":"K-9 Mail for Android","In-Reply-To":"<20170831033846.23538-1-sam@mendozajonas.com>","References":"<20170831033846.23538-1-sam@mendozajonas.com>","MIME-Version":"1.0","Content-Type":"text/plain;\n charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [PATCH net-next] net/ncsi: Define {add,\n\tkill}_vid callbacks for !CONFIG_NET_NCSI","To":"Samuel Mendoza-Jonas <sam@mendozajonas.com>,\n\t\"David S . Miller\" <davem@davemloft.net>, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, OpenBMC Maillist <openbmc@lists.ozlabs.org>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<6D0042A3-C029-4CAC-86B1-F570E541D8C0@gmail.com>","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Gavin Shan <gwshan@linux.vnet.ibm.com>","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1761110,"web_url":"http://patchwork.ozlabs.org/comment/1761110/","msgid":"<20170831152414.GB69617@mauery>","list_archive_url":null,"date":"2017-08-31T15:24:14","subject":"Re: [PATCH net-next] net/ncsi: Define {add, kill}_vid callbacks for\n\t!CONFIG_NET_NCSI","submitter":{"id":72266,"url":"http://patchwork.ozlabs.org/api/people/72266/","name":"Vernon Mauery","email":"vernon.mauery@linux.intel.com"},"content":"On 31-Aug-2017 01:38 PM, Samuel Mendoza-Jonas wrote:\n> Patch \"net/ncsi: Configure VLAN tag filter\" defined two new callback\n> functions in include/net/ncsi.h, but neglected the !CONFIG_NET_NCSI\n> case. This can cause a build error if these are referenced elsewhere\n> without NCSI enabled, for example in ftgmac100:\n> \n> >>> ERROR: \"ncsi_vlan_rx_kill_vid\" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined!\n> >>> ERROR: \"ncsi_vlan_rx_add_vid\" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined!\n> \n> Add definitions for !CONFIG_NET_NCSI to bring it into line with the rest\n> of ncsi.h\n> \n> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>\n> ---\n>  include/net/ncsi.h | 8 ++++++++\n>  1 file changed, 8 insertions(+)\n> \n> diff --git a/include/net/ncsi.h b/include/net/ncsi.h\n> index 1f96af46df49..2b13b6b91a4d 100644\n> --- a/include/net/ncsi.h\n> +++ b/include/net/ncsi.h\n> @@ -36,6 +36,14 @@ int ncsi_start_dev(struct ncsi_dev *nd);\n>  void ncsi_stop_dev(struct ncsi_dev *nd);\n>  void ncsi_unregister_dev(struct ncsi_dev *nd);\n>  #else /* !CONFIG_NET_NCSI */\n> +int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)\n> +{\n> +\treturn -ENOTTY;\n> +}\n> +int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)\n> +{\n> +\treturn -ENOTTY;\n> +}\n\nThese should be static functions because they are defined in the header \nfile or you will get multiple symbol definitions.\n\n--Vernon\n\n>  static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev,\n>  \t\t\t\t\tvoid (*notifier)(struct ncsi_dev *nd))\n>  {\n> -- \n> 2.14.1\n>","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjmPm0bfTz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:24:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjmPl35QqzDqRM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 01:24:27 +1000 (AEST)","from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjmPZ1rNszDqF4\n\tfor <openbmc@lists.ozlabs.org>; Fri,  1 Sep 2017 01:24:17 +1000 (AEST)","from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t31 Aug 2017 08:24:14 -0700","from mauery.jf.intel.com (HELO mauery) ([10.7.150.85])\n\tby orsmga003.jf.intel.com with ESMTP; 31 Aug 2017 08:24:14 -0700"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos; i=\"5.41,453,1498546800\"; d=\"scan'208\";\n\ta=\"1009689937\"","Date":"Thu, 31 Aug 2017 08:24:14 -0700","From":"Vernon Mauery <vernon.mauery@linux.intel.com>","To":"Samuel Mendoza-Jonas <sam@mendozajonas.com>","Subject":"Re: [PATCH net-next] net/ncsi: Define {add, kill}_vid callbacks for\n\t!CONFIG_NET_NCSI","Message-ID":"<20170831152414.GB69617@mauery>","References":"<20170831033846.23538-1-sam@mendozajonas.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170831033846.23538-1-sam@mendozajonas.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"netdev@vger.kernel.org, OpenBMC Maillist <openbmc@lists.ozlabs.org>,\n\t\"David S . Miller\" <davem@davemloft.net>,\n\tGavin Shan <gwshan@linux.vnet.ibm.com>, linux-kernel@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1761334,"web_url":"http://patchwork.ozlabs.org/comment/1761334/","msgid":"<1504214050.4974.52.camel@kernel.crashing.org>","list_archive_url":null,"date":"2017-08-31T21:14:10","subject":"Re: [PATCH net-next] net/ncsi: Define {add, kill}_vid callbacks for\n\t!CONFIG_NET_NCSI","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"content":"On Thu, 2017-08-31 at 08:24 -0700, Vernon Mauery wrote:\n>  +int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)\n> > +{\n> > +     return -ENOTTY;\n> > +}\n> > +int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)\n> > +{\n> > +     return -ENOTTY;\n> > +}\n> \n> These should be static functions because they are defined in the header \n> file or you will get multiple symbol definitions.\n\nstatic inline even or you'll get warning about them being unused iirc.\n\nCheers,\nBen.","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjwjv3N1Nz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 07:38:59 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjwjv2RL8zDqY9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 07:38:59 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjwjp54tzzDqXj\n\tfor <openbmc@lists.ozlabs.org>; Fri,  1 Sep 2017 07:38:54 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v7VLEA48029281;\n\tThu, 31 Aug 2017 16:14:18 -0500"],"Message-ID":"<1504214050.4974.52.camel@kernel.crashing.org>","Subject":"Re: [PATCH net-next] net/ncsi: Define {add, kill}_vid callbacks for\n\t!CONFIG_NET_NCSI","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"Vernon Mauery <vernon.mauery@linux.intel.com>, Samuel Mendoza-Jonas\n\t<sam@mendozajonas.com>","Date":"Fri, 01 Sep 2017 07:14:10 +1000","In-Reply-To":"<20170831152414.GB69617@mauery>","References":"<20170831033846.23538-1-sam@mendozajonas.com>\n\t<20170831152414.GB69617@mauery>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.5 (3.24.5-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"netdev@vger.kernel.org, OpenBMC Maillist <openbmc@lists.ozlabs.org>,\n\t\"David S . Miller\" <davem@davemloft.net>,\n\tGavin Shan <gwshan@linux.vnet.ibm.com>, linux-kernel@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}}]