From: Vernon Mauery <vernon.mauery@linux.intel.com>
To: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Cc: "David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: Re: [PATCH net-next] net/ncsi: Define {add, kill}_vid callbacks for !CONFIG_NET_NCSI
Date: Thu, 31 Aug 2017 08:24:14 -0700 [thread overview]
Message-ID: <20170831152414.GB69617@mauery> (raw)
In-Reply-To: <20170831033846.23538-1-sam@mendozajonas.com>
On 31-Aug-2017 01:38 PM, Samuel Mendoza-Jonas wrote:
> Patch "net/ncsi: Configure VLAN tag filter" defined two new callback
> functions in include/net/ncsi.h, but neglected the !CONFIG_NET_NCSI
> case. This can cause a build error if these are referenced elsewhere
> without NCSI enabled, for example in ftgmac100:
>
> >>> ERROR: "ncsi_vlan_rx_kill_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined!
> >>> ERROR: "ncsi_vlan_rx_add_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] undefined!
>
> Add definitions for !CONFIG_NET_NCSI to bring it into line with the rest
> of ncsi.h
>
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> ---
> include/net/ncsi.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/net/ncsi.h b/include/net/ncsi.h
> index 1f96af46df49..2b13b6b91a4d 100644
> --- a/include/net/ncsi.h
> +++ b/include/net/ncsi.h
> @@ -36,6 +36,14 @@ int ncsi_start_dev(struct ncsi_dev *nd);
> void ncsi_stop_dev(struct ncsi_dev *nd);
> void ncsi_unregister_dev(struct ncsi_dev *nd);
> #else /* !CONFIG_NET_NCSI */
> +int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
> +{
> + return -ENOTTY;
> +}
> +int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
> +{
> + return -ENOTTY;
> +}
These should be static functions because they are defined in the header
file or you will get multiple symbol definitions.
--Vernon
> static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
> void (*notifier)(struct ncsi_dev *nd))
> {
> --
> 2.14.1
>
next prev parent reply other threads:[~2017-08-31 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 3:38 [PATCH net-next] net/ncsi: Define {add,kill}_vid callbacks for !CONFIG_NET_NCSI Samuel Mendoza-Jonas
2017-08-31 3:59 ` Florian Fainelli
2017-08-31 15:24 ` Vernon Mauery [this message]
2017-08-31 21:14 ` [PATCH net-next] net/ncsi: Define {add, kill}_vid " Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170831152414.GB69617@mauery \
--to=vernon.mauery@linux.intel.com \
--cc=davem@davemloft.net \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=sam@mendozajonas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).