* [PATCH net-next] rtnetlink: Drop unnecessary return value from ndo_dflt_fdb_del
@ 2014-07-15 22:15 Alexander Duyck
2014-07-17 6:13 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2014-07-15 22:15 UTC (permalink / raw)
To: netdev; +Cc: davem
This change cleans up ndo_dflt_fdb_del to drop the ENOTSUPP return value since
that isn't actually returned anywhere in the code. As a result we are able to
drop a few lines by just defaulting this to -EINVAL.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
net/core/rtnetlink.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 1f8a59e..ad00c35 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2388,22 +2388,20 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
struct net_device *dev,
const unsigned char *addr)
{
- int err = -EOPNOTSUPP;
+ int err = -EINVAL;
/* If aging addresses are supported device will need to
* implement its own handler for this.
*/
if (!(ndm->ndm_state & NUD_PERMANENT)) {
pr_info("%s: FDB only supports static addresses\n", dev->name);
- return -EINVAL;
+ return err;
}
if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
err = dev_uc_del(dev, addr);
else if (is_multicast_ether_addr(addr))
err = dev_mc_del(dev, addr);
- else
- err = -EINVAL;
return err;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] rtnetlink: Drop unnecessary return value from ndo_dflt_fdb_del
2014-07-15 22:15 [PATCH net-next] rtnetlink: Drop unnecessary return value from ndo_dflt_fdb_del Alexander Duyck
@ 2014-07-17 6:13 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-07-17 6:13 UTC (permalink / raw)
To: alexander.h.duyck; +Cc: netdev
From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Tue, 15 Jul 2014 15:15:20 -0700
> This change cleans up ndo_dflt_fdb_del to drop the ENOTSUPP return value since
> that isn't actually returned anywhere in the code. As a result we are able to
> drop a few lines by just defaulting this to -EINVAL.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-17 6:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 22:15 [PATCH net-next] rtnetlink: Drop unnecessary return value from ndo_dflt_fdb_del Alexander Duyck
2014-07-17 6:13 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.