* [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled [not found] <20100517163521.649526d0.sfr@canb.auug.org.au> @ 2010-05-17 16:17 ` Randy Dunlap 2010-05-17 17:56 ` Stephen Hemminger 0 siblings, 1 reply; 6+ messages in thread From: Randy Dunlap @ 2010-05-17 16:17 UTC (permalink / raw) To: Stephen Rothwell, Stephen Hemminger; +Cc: linux-next, LKML, netdev, davem From: Randy Dunlap <randy.dunlap@oracle.com> Fix build when CONFIG_SYSFS is not enabled: net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- net/bridge/br_if.c | 2 ++ 1 file changed, 2 insertions(+) --- linux-next-20100517.orig/net/bridge/br_if.c +++ linux-next-20100517/net/bridge/br_if.c @@ -133,7 +133,9 @@ static void del_nbp(struct net_bridge_po struct net_bridge *br = p->br; struct net_device *dev = p->dev; +#ifdef CONFIG_SYSFS sysfs_remove_link(br->ifobj, p->sysfs_name); +#endif dev_set_promiscuity(dev, -1); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled 2010-05-17 16:17 ` [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled Randy Dunlap @ 2010-05-17 17:56 ` Stephen Hemminger 2010-05-17 18:01 ` Randy Dunlap 0 siblings, 1 reply; 6+ messages in thread From: Stephen Hemminger @ 2010-05-17 17:56 UTC (permalink / raw) To: Randy Dunlap; +Cc: Stephen Rothwell, linux-next, LKML, netdev, davem On Mon, 17 May 2010 09:17:56 -0700 Randy Dunlap <randy.dunlap@oracle.com> wrote: > From: Randy Dunlap <randy.dunlap@oracle.com> > > Fix build when CONFIG_SYSFS is not enabled: > > net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > --- > net/bridge/br_if.c | 2 ++ > 1 file changed, 2 insertions(+) > > --- linux-next-20100517.orig/net/bridge/br_if.c > +++ linux-next-20100517/net/bridge/br_if.c > @@ -133,7 +133,9 @@ static void del_nbp(struct net_bridge_po > struct net_bridge *br = p->br; > struct net_device *dev = p->dev; > > +#ifdef CONFIG_SYSFS > sysfs_remove_link(br->ifobj, p->sysfs_name); > +#endif > > dev_set_promiscuity(dev, -1); > I don't like peppering code with #ifdef like this. Turns out that in this place sysfs_name is always the same as the device name so instead: --- a/net/bridge/br_if.c 2010-05-17 10:40:49.808031840 -0700 +++ b/net/bridge/br_if.c 2010-05-17 10:49:47.767669246 -0700 @@ -133,7 +133,7 @@ static void del_nbp(struct net_bridge_po struct net_bridge *br = p->br; struct net_device *dev = p->dev; - sysfs_remove_link(br->ifobj, p->sysfs_name); + sysfs_remove_link(br->ifobj, p->dev->name); dev_set_promiscuity(dev, -1); -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled 2010-05-17 17:56 ` Stephen Hemminger @ 2010-05-17 18:01 ` Randy Dunlap 2010-05-18 5:32 ` David Miller 0 siblings, 1 reply; 6+ messages in thread From: Randy Dunlap @ 2010-05-17 18:01 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Stephen Rothwell, linux-next, LKML, netdev, davem On 05/17/10 10:56, Stephen Hemminger wrote: > On Mon, 17 May 2010 09:17:56 -0700 > Randy Dunlap <randy.dunlap@oracle.com> wrote: > >> From: Randy Dunlap <randy.dunlap@oracle.com> >> >> Fix build when CONFIG_SYSFS is not enabled: >> >> net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' >> >> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> >> --- >> net/bridge/br_if.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> --- linux-next-20100517.orig/net/bridge/br_if.c >> +++ linux-next-20100517/net/bridge/br_if.c >> @@ -133,7 +133,9 @@ static void del_nbp(struct net_bridge_po >> struct net_bridge *br = p->br; >> struct net_device *dev = p->dev; >> >> +#ifdef CONFIG_SYSFS >> sysfs_remove_link(br->ifobj, p->sysfs_name); >> +#endif >> >> dev_set_promiscuity(dev, -1); >> > > I don't like peppering code with #ifdef like this. Thanks. I didn't like it either. > Turns out that in this place sysfs_name is always the same > as the device name so instead: > > > --- a/net/bridge/br_if.c 2010-05-17 10:40:49.808031840 -0700 > +++ b/net/bridge/br_if.c 2010-05-17 10:49:47.767669246 -0700 > @@ -133,7 +133,7 @@ static void del_nbp(struct net_bridge_po > struct net_bridge *br = p->br; > struct net_device *dev = p->dev; > > - sysfs_remove_link(br->ifobj, p->sysfs_name); > + sysfs_remove_link(br->ifobj, p->dev->name); > > dev_set_promiscuity(dev, -1); > > > -- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled 2010-05-17 18:01 ` Randy Dunlap @ 2010-05-18 5:32 ` David Miller 2010-05-18 17:28 ` Stephen Hemminger 0 siblings, 1 reply; 6+ messages in thread From: David Miller @ 2010-05-18 5:32 UTC (permalink / raw) To: randy.dunlap; +Cc: shemminger, sfr, linux-next, linux-kernel, netdev From: Randy Dunlap <randy.dunlap@oracle.com> Date: Mon, 17 May 2010 11:01:12 -0700 > On 05/17/10 10:56, Stephen Hemminger wrote: >> On Mon, 17 May 2010 09:17:56 -0700 >> Randy Dunlap <randy.dunlap@oracle.com> wrote: >> >>> From: Randy Dunlap <randy.dunlap@oracle.com> >>> >>> Fix build when CONFIG_SYSFS is not enabled: >>> >>> net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' >>> >>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> ... >> I don't like peppering code with #ifdef like this. > > Thanks. I didn't like it either. > >> Turns out that in this place sysfs_name is always the same >> as the device name so instead: Stephen, please give me a formal submission of this fix with proper signoff and credit to Randy. Thanks! ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled 2010-05-18 5:32 ` David Miller @ 2010-05-18 17:28 ` Stephen Hemminger 2010-05-18 19:26 ` David Miller 0 siblings, 1 reply; 6+ messages in thread From: Stephen Hemminger @ 2010-05-18 17:28 UTC (permalink / raw) To: David Miller; +Cc: randy.dunlap, sfr, linux-next, linux-kernel, netdev From: Randy Dunlap <randy.dunlap@oracle.com> Fix build when CONFIG_SYSFS is not enabled: net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' Note: dev->name == sysfs_name except when change name is in progress, and we are protected from that by RTNL mutex. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-off-by: Stephen Hemminger <shemminger@vyatta.com> --- a/net/bridge/br_if.c 2010-05-17 10:51:48.638634187 -0700 +++ b/net/bridge/br_if.c 2010-05-18 10:22:28.892111158 -0700 @@ -133,7 +133,7 @@ static void del_nbp(struct net_bridge_po struct net_bridge *br = p->br; struct net_device *dev = p->dev; - sysfs_remove_link(br->ifobj, p->sysfs_name); + sysfs_remove_link(br->ifobj, p->dev->name); dev_set_promiscuity(dev, -1); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled 2010-05-18 17:28 ` Stephen Hemminger @ 2010-05-18 19:26 ` David Miller 0 siblings, 0 replies; 6+ messages in thread From: David Miller @ 2010-05-18 19:26 UTC (permalink / raw) To: shemminger; +Cc: randy.dunlap, sfr, linux-next, linux-kernel, netdev From: Stephen Hemminger <shemminger@vyatta.com> Date: Tue, 18 May 2010 10:28:37 -0700 > > From: Randy Dunlap <randy.dunlap@oracle.com> > > Fix build when CONFIG_SYSFS is not enabled: > net/bridge/br_if.c:136: error: 'struct net_bridge_port' has no member named 'sysfs_name' > > Note: dev->name == sysfs_name except when change name is in > progress, and we are protected from that by RTNL mutex. > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > Acked-off-by: Stephen Hemminger <shemminger@vyatta.com> It's "Acked-by" :-) Applied, thanks! ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-18 19:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20100517163521.649526d0.sfr@canb.auug.org.au> 2010-05-17 16:17 ` [PATCH -next] bridge: fix build for CONFIG_SYSFS disabled Randy Dunlap 2010-05-17 17:56 ` Stephen Hemminger 2010-05-17 18:01 ` Randy Dunlap 2010-05-18 5:32 ` David Miller 2010-05-18 17:28 ` Stephen Hemminger 2010-05-18 19:26 ` David Miller
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).