netdev
[Top] [All Lists]

[PATCH] dst: use const in accessors

To: davem@xxxxxxxxxx
Subject: [PATCH] dst: use const in accessors
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Mon, 18 Oct 2004 15:59:09 -0700
Cc: netdev@xxxxxxxxxxx
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
Trivial, dst cache inline's can use const.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

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. */

<Prev in Thread] Current Thread [Next in Thread>