[NET]: make seq_operations const
[powerpc.git] / net / ipv4 / route.c
index 9b5e564..e50ad7d 100644 (file)
@@ -70,7 +70,6 @@
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/bootmem.h>
 #include <linux/string.h>
@@ -365,7 +364,7 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations rt_cache_seq_ops = {
+static const struct seq_operations rt_cache_seq_ops = {
        .start  = rt_cache_seq_start,
        .next   = rt_cache_seq_next,
        .stop   = rt_cache_seq_stop,
@@ -471,7 +470,7 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations rt_cpu_seq_ops = {
+static const struct seq_operations rt_cpu_seq_ops = {
        .start  = rt_cpu_seq_start,
        .next   = rt_cpu_seq_next,
        .stop   = rt_cpu_seq_stop,
@@ -1699,9 +1698,9 @@ static void ip_handle_martian_source(struct net_device *dev,
                printk(KERN_WARNING "martian source %u.%u.%u.%u from "
                        "%u.%u.%u.%u, on dev %s\n",
                        NIPQUAD(daddr), NIPQUAD(saddr), dev->name);
-               if (dev->hard_header_len && skb->mac.raw) {
+               if (dev->hard_header_len && skb_mac_header_was_set(skb)) {
                        int i;
-                       unsigned char *p = skb->mac.raw;
+                       const unsigned char *p = skb_mac_header(skb);
                        printk(KERN_WARNING "ll header: ");
                        for (i = 0; i < dev->hard_header_len; i++, p++) {
                                printk("%02x", *p);
@@ -2684,7 +2683,7 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
                id = rt->peer->ip_id_count;
                if (rt->peer->tcp_ts_stamp) {
                        ts = rt->peer->tcp_ts;
-                       tsage = xtime.tv_sec - rt->peer->tcp_ts_stamp;
+                       tsage = get_seconds() - rt->peer->tcp_ts_stamp;
                }
        }
 
@@ -2748,7 +2747,8 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
        /* Reserve room for dummy headers, this skb can pass
           through good chunk of routing engine.
         */
-       skb->mac.raw = skb->nh.raw = skb->data;
+       skb_reset_mac_header(skb);
+       skb_reset_network_header(skb);
 
        /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
        skb->nh.iph->protocol = IPPROTO_ICMP;