linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Suspected Copy Paste error in rtnl_bridge_notify
       [not found] ` <CAG6enPyV9bvYSwDrMp6X1LY6PXrmrP5MtjNk0N+7qs1LDY5pRg@mail.gmail.com>
@ 2014-01-31 11:47   ` Tejun Heo
  2014-02-07  3:45     ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2014-01-31 11:47 UTC (permalink / raw)
  To: Yogesh Gaur; +Cc: akpm, torvalds, linux-kernel, David S. Miller, netdev

Hey,

Seems suspicious but I don't know the code at all.  cc'ing David and
netdev and quoting the whole body for them.

Thanks.

On Fri, Jan 31, 2014 at 11:32:55AM +0530, Yogesh Gaur wrote:
> Hello All,
> 
> I want to clarify about following code-snippet from
> file: "net/core/rtnetlink.c"
> func: rtnl_bridge_notify
> 
> ----------------------------------------------------------------------------
> |    if ((!flags || (flags & BRIDGE_FLAGS_MASTER)) && |
> |        br_dev && br_dev->netdev_ops->ndo_bridge_getlink) {
> |
> |        err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0);
> |
> |        if (err < 0)
> |
> |            goto errout;
> |
> |    }
> |
> |
> |
> |    if ((flags & BRIDGE_FLAGS_SELF) &&
> |
> |        dev->netdev_ops->ndo_bridge_getlink) {
> |
> |        err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0);
> |
> |        if (err < 0)
> |
> |            goto errout;
> |
> ----------------------------------------------------------------------------
> 
> In above code isn't code line:
> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0);
> should be
> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, br_dev, 0);
> 
> If this needs to be changed then please review attached patch adding this
> change.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suspected Copy Paste error in rtnl_bridge_notify
  2014-01-31 11:47   ` Suspected Copy Paste error in rtnl_bridge_notify Tejun Heo
@ 2014-02-07  3:45     ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-02-07  3:45 UTC (permalink / raw)
  To: tj; +Cc: yogeshgaur.83, akpm, torvalds, linux-kernel, netdev

From: Tejun Heo <tj@kernel.org>
Date: Fri, 31 Jan 2014 06:47:12 -0500

>> In above code isn't code line:
>> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0);
>> should be
>> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, br_dev, 0);
>> 
>> If this needs to be changed then please review attached patch adding this
>> change.

It's not a typo, we want the actual underlying physical device.

Look at the implementations such as drivers/net/ethernet/emulex/be_main.c:
be_ndo_bridge_netlink().  It's doing things like:

	struct be_adapter *adapter = netdev_priv(dev);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-07  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAG6enPwAfm8YDrGmEEitv_fHeF5rVVN2nXujh=u4kVy0sKx4ag@mail.gmail.com>
     [not found] ` <CAG6enPyV9bvYSwDrMp6X1LY6PXrmrP5MtjNk0N+7qs1LDY5pRg@mail.gmail.com>
2014-01-31 11:47   ` Suspected Copy Paste error in rtnl_bridge_notify Tejun Heo
2014-02-07  3:45     ` 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).