* [PATCH net-2.6.25] [NEIGH] Remove unused method from include/net/neighbour.h
@ 2007-12-28 15:56 Rami Rosen
2007-12-31 7:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Rami Rosen @ 2007-12-28 15:56 UTC (permalink / raw)
To: davem; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
Hello,
It seems to me that neigh_is_valid() inline method from
include/net/neighbour.h can be removed since it is not used.
Though it can be considered as an API for future use, and
indeed we have neigh_is_connected() method in this same header (which is BTW
used only in one place, drivers/net/cxgb3/l2t.c), we can easily notice
that we don't have
any accessor method to check whether the neighbour is in NUD_IN_TIMER
(not to mention that we don't have methods to check the single neighbour states,
like NUD_REACHABLE or NUD_DELAY or the other ones). So for consistency
I suggest to
consider removing the neigh_is_valid() method.
Regards,
Rami Rosen
http://www.linux-foundation.org/en/Net:Network_Overview
Signed-off-by: Rami Rosen <ramirose@gmail.com>
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 471 bytes --]
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 11590f2..a9dda29 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -292,10 +292,6 @@ static inline int neigh_is_connected(struct neighbour *neigh)
return neigh->nud_state&NUD_CONNECTED;
}
-static inline int neigh_is_valid(struct neighbour *neigh)
-{
- return neigh->nud_state&NUD_VALID;
-}
static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-2.6.25] [NEIGH] Remove unused method from include/net/neighbour.h
2007-12-28 15:56 [PATCH net-2.6.25] [NEIGH] Remove unused method from include/net/neighbour.h Rami Rosen
@ 2007-12-31 7:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-12-31 7:26 UTC (permalink / raw)
To: ramirose; +Cc: netdev
From: "Rami Rosen" <ramirose@gmail.com>
Date: Fri, 28 Dec 2007 17:56:46 +0200
> It seems to me that neigh_is_valid() inline method from
> include/net/neighbour.h can be removed since it is not used.
>
> Though it can be considered as an API for future use, and
> indeed we have neigh_is_connected() method in this same header (which is BTW
> used only in one place, drivers/net/cxgb3/l2t.c), we can easily notice
> that we don't have
> any accessor method to check whether the neighbour is in NUD_IN_TIMER
> (not to mention that we don't have methods to check the single neighbour states,
> like NUD_REACHABLE or NUD_DELAY or the other ones). So for consistency
> I suggest to
> consider removing the neigh_is_valid() method.
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
This is a helper function which was used by drivers implementing
support for the old fast routing code which we removed years ago.
So yes we should remove this.
Patch applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-31 7:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 15:56 [PATCH net-2.6.25] [NEIGH] Remove unused method from include/net/neighbour.h Rami Rosen
2007-12-31 7: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