Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614036

Re: [PATCH net-next] net: dsa: fix build error with devlink build as module

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next] net: dsa: fix build error with devlink build as module
Date 2017-03-31 15:40 +0200
Message-ID <tr4Wv-5cZ-33@gated-at.bofh.it> (permalink)
References <tr1lU-2QW-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Mar 31, 2017 at 11:44:52AM +0200, Tobias Regnery wrote:
> After commit 96567d5dacf4 ("net: dsa: dsa2: Add basic support of devlink")
> I see the following link error with CONFIG_NET_DSA=y and CONFIG_NET_DEVLINK=m:
> 
> net/built-in.o: In function 'dsa_register_switch':
> (.text+0xe226b): undefined reference to `devlink_alloc'
> net/built-in.o: In function 'dsa_register_switch':
> (.text+0xe2284): undefined reference to `devlink_register'
> net/built-in.o: In function 'dsa_register_switch':
> (.text+0xe243e): undefined reference to `devlink_port_register'
> net/built-in.o: In function 'dsa_register_switch':
> (.text+0xe24e1): undefined reference to `devlink_port_register'
> net/built-in.o: In function 'dsa_register_switch':
> (.text+0xe24fa): undefined reference to `devlink_port_type_eth_set'
> net/built-in.o: In function 'dsa_dst_unapply.part.8':
> dsa2.c:(.text.unlikely+0x345): undefined reference to 'devlink_port_unregister'
> dsa2.c:(.text.unlikely+0x36c): undefined reference to 'devlink_port_unregister'
> dsa2.c:(.text.unlikely+0x38e): undefined reference to 'devlink_port_unregister'
> dsa2.c:(.text.unlikely+0x3f2): undefined reference to 'devlink_unregister'
> dsa2.c:(.text.unlikely+0x3fb): undefined reference to 'devlink_free'
> 
> Fix this by adding a dependency on MAY_USE_DEVLINK so that CONFIG_NET_DSA
> get switched to be build as module when CONFIG_NET_DEVLINK=m.
> 
> Fixes: 96567d5dacf4 ("net: dsa: dsa2: Add basic support of devlink")
> Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>

Hi Tobias

0-day just found the same issue as well.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thanks
    Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next] net: dsa: fix build error with devlink build as module Tobias Regnery <tobias.regnery@gmail.com> - 2017-03-31 11:50 +0200
  Re: [PATCH net-next] net: dsa: fix build error with devlink build as  module Andrew Lunn <andrew@lunn.ch> - 2017-03-31 15:40 +0200
  Re: [PATCH net-next] net: dsa: fix build error with devlink build  as module David Miller <davem@davemloft.net> - 2017-04-02 05:20 +0200

csiph-web