]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4]: inet_addr_type() annotations
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Sep 2006 05:17:51 +0000 (22:17 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:01:07 +0000 (18:01 -0700)
argument and inferred net-endian variables in callers annotated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_main.c
include/net/route.h
net/ipv4/arp.c
net/ipv4/fib_frontend.c
net/ipv4/ip_options.c
net/ipv4/netfilter/ipt_addrtype.c
net/ipv6/af_inet6.c

index 5613b4564fa2967f3b78a37fff49c87e621301be..8364d5475ac7fa5a8d2898f3a65d4d70a57b3066 100644 (file)
@@ -8067,7 +8067,7 @@ qeth_arp_constructor(struct neighbour *neigh)
        neigh->parms = neigh_parms_clone(parms);
        rcu_read_unlock();
 
-       neigh->type = inet_addr_type(*(u32 *) neigh->primary_key);
+       neigh->type = inet_addr_type(*(__be32 *) neigh->primary_key);
        neigh->nud_state = NUD_NOARP;
        neigh->ops = arp_direct_ops;
        neigh->output = neigh->ops->queue_xmit;
index 63524843f6d9dce21ce236d15d4748abb6e6a3ec..58752722c968fb4069f614d31d3ab81dfb6b41a0 100644 (file)
@@ -120,7 +120,7 @@ extern int          ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, stru
 extern unsigned short  ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
 extern void            ip_rt_send_redirect(struct sk_buff *skb);
 
-extern unsigned                inet_addr_type(u32 addr);
+extern unsigned                inet_addr_type(__be32 addr);
 extern void            ip_rt_multicast_event(struct in_device *);
 extern int             ip_rt_ioctl(unsigned int cmd, void __user *arg);
 extern void            ip_rt_get_source(u8 *src, struct rtable *rt);
index db72339c21e1a13da27c57709f2982291d0d6ffc..2a29a5ebc978c88c3259f78777c0d56447dbf1e3 100644 (file)
@@ -234,7 +234,7 @@ static u32 arp_hash(const void *pkey, const struct net_device *dev)
 
 static int arp_constructor(struct neighbour *neigh)
 {
-       u32 addr = *(u32*)neigh->primary_key;
+       __be32 addr = *(__be32*)neigh->primary_key;
        struct net_device *dev = neigh->dev;
        struct in_device *in_dev;
        struct neigh_parms *parms;
@@ -470,7 +470,7 @@ static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, s
 int arp_find(unsigned char *haddr, struct sk_buff *skb)
 {
        struct net_device *dev = skb->dev;
-       u32 paddr;
+       __be32 paddr;
        struct neighbour *n;
 
        if (!skb->dst) {
index c0bd2f122da247d77b308b9e7b527d8e44608dc1..34dc640478a037e8de8b8b85ccb8c09851416e2d 100644 (file)
@@ -146,7 +146,7 @@ out:
        return dev;
 }
 
-unsigned inet_addr_type(u32 addr)
+unsigned inet_addr_type(__be32 addr)
 {
        struct flowi            fl = { .nl_u = { .ip4_u = { .daddr = addr } } };
        struct fib_result       res;
index 87f25486fd64907f056ba7cf997728ed8404a9e0..3245bec23f4df51742be654a338068a6d05ed8a5 100644 (file)
@@ -148,7 +148,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb)
                                        dopt->ts_needtime = 0;
 
                                        if (soffset + 8 <= optlen) {
-                                               __u32 addr;
+                                               __be32 addr;
 
                                                memcpy(&addr, sptr+soffset-1, 4);
                                                if (inet_addr_type(addr) != RTN_LOCAL) {
@@ -396,7 +396,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
                                        }
                                        opt->ts = optptr - iph;
                                        {
-                                               u32 addr;
+                                               __be32 addr;
                                                memcpy(&addr, &optptr[optptr[2]-1], 4);
                                                if (inet_addr_type(addr) == RTN_UNICAST)
                                                        break;
index 893dae210b0482b324329fffc834974c6e61ec32..7b60eb74788b6671617425cd2c2602ffe79fe956 100644 (file)
@@ -22,7 +22,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
 MODULE_DESCRIPTION("iptables addrtype match");
 
-static inline int match_type(u_int32_t addr, u_int16_t mask)
+static inline int match_type(__be32 addr, u_int16_t mask)
 {
        return !!(mask & (1 << inet_addr_type(addr)));
 }
index bf6e8aff19d4f2fa62a5e18641548bd0a4e2a60b..e94eccb99707991c80409ebce8a157e1beaba3e7 100644 (file)
@@ -246,7 +246,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        struct sock *sk = sock->sk;
        struct inet_sock *inet = inet_sk(sk);
        struct ipv6_pinfo *np = inet6_sk(sk);
-       __u32 v4addr = 0;
+       __be32 v4addr = 0;
        unsigned short snum;
        int addr_type = 0;
        int err = 0;