netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dst: use const in accessors
@ 2004-10-18 22:59 Stephen Hemminger
  2004-10-21  5:14 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2004-10-18 22:59 UTC (permalink / raw)
  To: davem; +Cc: netdev

Trivial, dst cache inline's can use const.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

diff -Nru a/include/net/dst.h b/include/net/dst.h
--- a/include/net/dst.h	2004-10-15 10:33:43 -07:00
+++ b/include/net/dst.h	2004-10-15 10:33:43 -07:00
@@ -103,19 +103,19 @@
 #ifdef __KERNEL__
 
 static inline u32
-dst_metric(struct dst_entry *dst, int metric)
+dst_metric(const struct dst_entry *dst, int metric)
 {
 	return dst->metrics[metric-1];
 }
 
 static inline u32
-dst_path_metric(struct dst_entry *dst, int metric)
+dst_path_metric(const struct dst_entry *dst, int metric)
 {
 	return dst->path->metrics[metric-1];
 }
 
 static inline u32
-dst_pmtu(struct dst_entry *dst)
+dst_pmtu(const struct dst_entry *dst)
 {
 	u32 mtu = dst_path_metric(dst, RTAX_MTU);
 	/* Yes, _exactly_. This is paranoia. */

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

* Re: [PATCH] dst: use const in accessors
  2004-10-18 22:59 [PATCH] dst: use const in accessors Stephen Hemminger
@ 2004-10-21  5:14 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-10-21  5:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Mon, 18 Oct 2004 15:59:09 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:

> Trivial, dst cache inline's can use const.
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

Applied, thanks Stephen.

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

end of thread, other threads:[~2004-10-21  5:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-18 22:59 [PATCH] dst: use const in accessors Stephen Hemminger
2004-10-21  5:14 ` David S. 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).