diff options
-rw-r--r-- | drivers/infiniband/core/addr.c | 4 | ||||
-rw-r--r-- | include/linux/inetdevice.h | 10 | ||||
-rw-r--r-- | net/ipv4/devinet.c | 12 | ||||
-rw-r--r-- | net/ipv4/fib_frontend.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 9cbf09e2052f..60d3fbdd216c 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(rdma_copy_addr); | |||
86 | int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr) | 86 | int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr) |
87 | { | 87 | { |
88 | struct net_device *dev; | 88 | struct net_device *dev; |
89 | u32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr; | 89 | __be32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr; |
90 | int ret; | 90 | int ret; |
91 | 91 | ||
92 | dev = ip_dev_find(ip); | 92 | dev = ip_dev_find(ip); |
@@ -239,7 +239,7 @@ static int addr_resolve_local(struct sockaddr_in *src_in, | |||
239 | { | 239 | { |
240 | struct net_device *dev; | 240 | struct net_device *dev; |
241 | u32 src_ip = src_in->sin_addr.s_addr; | 241 | u32 src_ip = src_in->sin_addr.s_addr; |
242 | u32 dst_ip = dst_in->sin_addr.s_addr; | 242 | __be32 dst_ip = dst_in->sin_addr.s_addr; |
243 | int ret; | 243 | int ret; |
244 | 244 | ||
245 | dev = ip_dev_find(dst_ip); | 245 | dev = ip_dev_find(dst_ip); |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 54b32e8b8f65..5a0ab04627bc 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -104,18 +104,18 @@ struct in_ifaddr | |||
104 | extern int register_inetaddr_notifier(struct notifier_block *nb); | 104 | extern int register_inetaddr_notifier(struct notifier_block *nb); |
105 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); | 105 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); |
106 | 106 | ||
107 | extern struct net_device *ip_dev_find(u32 addr); | 107 | extern struct net_device *ip_dev_find(__be32 addr); |
108 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); | 108 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); |
109 | extern int devinet_ioctl(unsigned int cmd, void __user *); | 109 | extern int devinet_ioctl(unsigned int cmd, void __user *); |
110 | extern void devinet_init(void); | 110 | extern void devinet_init(void); |
111 | extern struct in_device *inetdev_init(struct net_device *dev); | 111 | extern struct in_device *inetdev_init(struct net_device *dev); |
112 | extern struct in_device *inetdev_by_index(int); | 112 | extern struct in_device *inetdev_by_index(int); |
113 | extern __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); | 113 | extern __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); |
114 | extern u32 inet_confirm_addr(const struct net_device *dev, u32 dst, u32 local, int scope); | 114 | extern __be32 inet_confirm_addr(const struct net_device *dev, __be32 dst, __be32 local, int scope); |
115 | extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask); | 115 | extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, __be32 mask); |
116 | extern void inet_forward_change(void); | 116 | extern void inet_forward_change(void); |
117 | 117 | ||
118 | static __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) | 118 | static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) |
119 | { | 119 | { |
120 | return !((addr^ifa->ifa_address)&ifa->ifa_mask); | 120 | return !((addr^ifa->ifa_address)&ifa->ifa_mask); |
121 | } | 121 | } |
@@ -183,7 +183,7 @@ static inline void in_dev_put(struct in_device *idev) | |||
183 | 183 | ||
184 | #endif /* __KERNEL__ */ | 184 | #endif /* __KERNEL__ */ |
185 | 185 | ||
186 | static __inline__ __u32 inet_make_mask(int logmask) | 186 | static __inline__ __be32 inet_make_mask(int logmask) |
187 | { | 187 | { |
188 | if (logmask) | 188 | if (logmask) |
189 | return htonl(~((1<<(32-logmask))-1)); | 189 | return htonl(~((1<<(32-logmask))-1)); |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index afba56222fb5..7602c79a389b 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -429,8 +429,8 @@ struct in_device *inetdev_by_index(int ifindex) | |||
429 | 429 | ||
430 | /* Called only from RTNL semaphored context. No locks. */ | 430 | /* Called only from RTNL semaphored context. No locks. */ |
431 | 431 | ||
432 | struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, | 432 | struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, |
433 | u32 mask) | 433 | __be32 mask) |
434 | { | 434 | { |
435 | ASSERT_RTNL(); | 435 | ASSERT_RTNL(); |
436 | 436 | ||
@@ -927,8 +927,8 @@ out: | |||
927 | return addr; | 927 | return addr; |
928 | } | 928 | } |
929 | 929 | ||
930 | static u32 confirm_addr_indev(struct in_device *in_dev, u32 dst, | 930 | static __be32 confirm_addr_indev(struct in_device *in_dev, __be32 dst, |
931 | u32 local, int scope) | 931 | __be32 local, int scope) |
932 | { | 932 | { |
933 | int same = 0; | 933 | int same = 0; |
934 | __be32 addr = 0; | 934 | __be32 addr = 0; |
@@ -971,9 +971,9 @@ static u32 confirm_addr_indev(struct in_device *in_dev, u32 dst, | |||
971 | * - local: address, 0=autoselect the local address | 971 | * - local: address, 0=autoselect the local address |
972 | * - scope: maximum allowed scope value for the local address | 972 | * - scope: maximum allowed scope value for the local address |
973 | */ | 973 | */ |
974 | u32 inet_confirm_addr(const struct net_device *dev, u32 dst, u32 local, int scope) | 974 | __be32 inet_confirm_addr(const struct net_device *dev, __be32 dst, __be32 local, int scope) |
975 | { | 975 | { |
976 | u32 addr = 0; | 976 | __be32 addr = 0; |
977 | struct in_device *in_dev; | 977 | struct in_device *in_dev; |
978 | 978 | ||
979 | if (dev) { | 979 | if (dev) { |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 62ee71ee6bc9..c0bd2f122da2 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -122,7 +122,7 @@ static void fib_flush(void) | |||
122 | * Find the first device with a given source address. | 122 | * Find the first device with a given source address. |
123 | */ | 123 | */ |
124 | 124 | ||
125 | struct net_device * ip_dev_find(u32 addr) | 125 | struct net_device * ip_dev_find(__be32 addr) |
126 | { | 126 | { |
127 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; | 127 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; |
128 | struct fib_result res; | 128 | struct fib_result res; |