Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: fix checkpatch errors

Fix checkpatch errors of the following type:
* ERROR: "foo * bar" should be "foo *bar"
* ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Baluta and committed by
David S. Miller
5e73ea1a 586d17c5

+49 -49
+1 -1
net/ipv4/af_inet.c
··· 541 541 } 542 542 EXPORT_SYMBOL(inet_bind); 543 543 544 - int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr, 544 + int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, 545 545 int addr_len, int flags) 546 546 { 547 547 struct sock *sk = sock->sk;
+1 -1
net/ipv4/ah4.c
··· 77 77 78 78 static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr) 79 79 { 80 - unsigned char * optptr = (unsigned char*)(iph+1); 80 + unsigned char *optptr = (unsigned char *)(iph+1); 81 81 int l = iph->ihl*4 - sizeof(struct iphdr); 82 82 int optlen; 83 83
+8 -8
net/ipv4/igmp.c
··· 344 344 pip->protocol = IPPROTO_IGMP; 345 345 pip->tot_len = 0; /* filled in later */ 346 346 ip_select_ident(pip, &rt->dst, NULL); 347 - ((u8*)&pip[1])[0] = IPOPT_RA; 348 - ((u8*)&pip[1])[1] = 4; 349 - ((u8*)&pip[1])[2] = 0; 350 - ((u8*)&pip[1])[3] = 0; 347 + ((u8 *)&pip[1])[0] = IPOPT_RA; 348 + ((u8 *)&pip[1])[1] = 4; 349 + ((u8 *)&pip[1])[2] = 0; 350 + ((u8 *)&pip[1])[3] = 0; 351 351 352 352 skb->transport_header = skb->network_header + sizeof(struct iphdr) + 4; 353 353 skb_put(skb, sizeof(*pig)); ··· 688 688 iph->saddr = fl4.saddr; 689 689 iph->protocol = IPPROTO_IGMP; 690 690 ip_select_ident(iph, &rt->dst, NULL); 691 - ((u8*)&iph[1])[0] = IPOPT_RA; 692 - ((u8*)&iph[1])[1] = 4; 693 - ((u8*)&iph[1])[2] = 0; 694 - ((u8*)&iph[1])[3] = 0; 691 + ((u8 *)&iph[1])[0] = IPOPT_RA; 692 + ((u8 *)&iph[1])[1] = 4; 693 + ((u8 *)&iph[1])[2] = 0; 694 + ((u8 *)&iph[1])[3] = 0; 695 695 696 696 ih = (struct igmphdr *)skb_put(skb, sizeof(struct igmphdr)); 697 697 ih->type = type;
+1 -1
net/ipv4/inet_hashtables.c
··· 217 217 } 218 218 EXPORT_SYMBOL_GPL(__inet_lookup_listener); 219 219 220 - struct sock * __inet_lookup_established(struct net *net, 220 + struct sock *__inet_lookup_established(struct net *net, 221 221 struct inet_hashinfo *hashinfo, 222 222 const __be32 saddr, const __be16 sport, 223 223 const __be32 daddr, const u16 hnum,
+2 -2
net/ipv4/ip_forward.c
··· 41 41 42 42 static int ip_forward_finish(struct sk_buff *skb) 43 43 { 44 - struct ip_options * opt = &(IPCB(skb)->opt); 44 + struct ip_options *opt = &(IPCB(skb)->opt); 45 45 46 46 IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS); 47 47 ··· 55 55 { 56 56 struct iphdr *iph; /* Our header */ 57 57 struct rtable *rt; /* Route we use */ 58 - struct ip_options * opt = &(IPCB(skb)->opt); 58 + struct ip_options *opt = &(IPCB(skb)->opt); 59 59 60 60 if (skb_warn_if_lro(skb)) 61 61 goto drop;
+10 -10
net/ipv4/ip_gre.c
··· 216 216 217 217 /* Given src, dst and key, find appropriate for input tunnel. */ 218 218 219 - static struct ip_tunnel * ipgre_tunnel_lookup(struct net_device *dev, 220 - __be32 remote, __be32 local, 221 - __be32 key, __be16 gre_proto) 219 + static struct ip_tunnel *ipgre_tunnel_lookup(struct net_device *dev, 220 + __be32 remote, __be32 local, 221 + __be32 key, __be16 gre_proto) 222 222 { 223 223 struct net *net = dev_net(dev); 224 224 int link = dev->ifindex; ··· 483 483 */ 484 484 485 485 const struct iphdr *iph = (const struct iphdr *)skb->data; 486 - __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); 486 + __be16 *p = (__be16 *)(skb->data+(iph->ihl<<2)); 487 487 int grehlen = (iph->ihl<<2) + 4; 488 488 const int type = icmp_hdr(skb)->type; 489 489 const int code = icmp_hdr(skb)->code; ··· 593 593 594 594 iph = ip_hdr(skb); 595 595 h = skb->data; 596 - flags = *(__be16*)h; 596 + flags = *(__be16 *)h; 597 597 598 598 if (flags&(GRE_CSUM|GRE_KEY|GRE_ROUTING|GRE_SEQ|GRE_VERSION)) { 599 599 /* - Version must be 0. ··· 617 617 offset += 4; 618 618 } 619 619 if (flags&GRE_KEY) { 620 - key = *(__be32*)(h + offset); 620 + key = *(__be32 *)(h + offset); 621 621 offset += 4; 622 622 } 623 623 if (flags&GRE_SEQ) { 624 - seqno = ntohl(*(__be32*)(h + offset)); 624 + seqno = ntohl(*(__be32 *)(h + offset)); 625 625 offset += 4; 626 626 } 627 627 } ··· 921 921 htons(ETH_P_TEB) : skb->protocol; 922 922 923 923 if (tunnel->parms.o_flags&(GRE_KEY|GRE_CSUM|GRE_SEQ)) { 924 - __be32 *ptr = (__be32*)(((u8*)iph) + tunnel->hlen - 4); 924 + __be32 *ptr = (__be32 *)(((u8 *)iph) + tunnel->hlen - 4); 925 925 926 926 if (tunnel->parms.o_flags&GRE_SEQ) { 927 927 ++tunnel->o_seqno; ··· 934 934 } 935 935 if (tunnel->parms.o_flags&GRE_CSUM) { 936 936 *ptr = 0; 937 - *(__sum16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr)); 937 + *(__sum16 *)ptr = ip_compute_csum((void *)(iph+1), skb->len - sizeof(struct iphdr)); 938 938 } 939 939 } 940 940 ··· 1190 1190 { 1191 1191 struct ip_tunnel *t = netdev_priv(dev); 1192 1192 struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen); 1193 - __be16 *p = (__be16*)(iph+1); 1193 + __be16 *p = (__be16 *)(iph+1); 1194 1194 1195 1195 memcpy(iph, &t->parms.iph, sizeof(struct iphdr)); 1196 1196 p[0] = t->parms.o_flags;
+12 -12
net/ipv4/ip_options.c
··· 210 210 * Simple and stupid 8), but the most efficient way. 211 211 */ 212 212 213 - void ip_options_fragment(struct sk_buff * skb) 213 + void ip_options_fragment(struct sk_buff *skb) 214 214 { 215 215 unsigned char *optptr = skb_network_header(skb) + sizeof(struct iphdr); 216 - struct ip_options * opt = &(IPCB(skb)->opt); 216 + struct ip_options *opt = &(IPCB(skb)->opt); 217 217 int l = opt->optlen; 218 218 int optlen; 219 219 ··· 248 248 */ 249 249 250 250 int ip_options_compile(struct net *net, 251 - struct ip_options * opt, struct sk_buff * skb) 251 + struct ip_options *opt, struct sk_buff *skb) 252 252 { 253 253 int l; 254 - unsigned char * iph; 255 - unsigned char * optptr; 254 + unsigned char *iph; 255 + unsigned char *optptr; 256 256 int optlen; 257 - unsigned char * pp_ptr = NULL; 257 + unsigned char *pp_ptr = NULL; 258 258 struct rtable *rt = NULL; 259 259 260 260 if (skb != NULL) { ··· 473 473 * Undo all the changes done by ip_options_compile(). 474 474 */ 475 475 476 - void ip_options_undo(struct ip_options * opt) 476 + void ip_options_undo(struct ip_options *opt) 477 477 { 478 478 if (opt->srr) { 479 - unsigned char * optptr = opt->__data+opt->srr-sizeof(struct iphdr); 479 + unsigned char *optptr = opt->__data+opt->srr-sizeof(struct iphdr); 480 480 memmove(optptr+7, optptr+3, optptr[1]-7); 481 481 memcpy(optptr+3, &opt->faddr, 4); 482 482 } 483 483 if (opt->rr_needaddr) { 484 - unsigned char * optptr = opt->__data+opt->rr-sizeof(struct iphdr); 484 + unsigned char *optptr = opt->__data+opt->rr-sizeof(struct iphdr); 485 485 optptr[2] -= 4; 486 486 memset(&optptr[optptr[2]-1], 0, 4); 487 487 } 488 488 if (opt->ts) { 489 - unsigned char * optptr = opt->__data+opt->ts-sizeof(struct iphdr); 489 + unsigned char *optptr = opt->__data+opt->ts-sizeof(struct iphdr); 490 490 if (opt->ts_needtime) { 491 491 optptr[2] -= 4; 492 492 memset(&optptr[optptr[2]-1], 0, 4); ··· 549 549 550 550 void ip_forward_options(struct sk_buff *skb) 551 551 { 552 - struct ip_options * opt = &(IPCB(skb)->opt); 553 - unsigned char * optptr; 552 + struct ip_options *opt = &(IPCB(skb)->opt); 553 + unsigned char *optptr; 554 554 struct rtable *rt = skb_rtable(skb); 555 555 unsigned char *raw = skb_network_header(skb); 556 556
+1 -1
net/ipv4/ip_sockglue.c
··· 90 90 static void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb) 91 91 { 92 92 unsigned char optbuf[sizeof(struct ip_options) + 40]; 93 - struct ip_options * opt = (struct ip_options *)optbuf; 93 + struct ip_options *opt = (struct ip_options *)optbuf; 94 94 95 95 if (IPCB(skb)->opt.optlen == 0) 96 96 return;
+2 -2
net/ipv4/ipip.c
··· 185 185 return tot; 186 186 } 187 187 188 - static struct ip_tunnel * ipip_tunnel_lookup(struct net *net, 188 + static struct ip_tunnel *ipip_tunnel_lookup(struct net *net, 189 189 __be32 remote, __be32 local) 190 190 { 191 191 unsigned int h0 = HASH(remote); ··· 260 260 rcu_assign_pointer(*tp, t); 261 261 } 262 262 263 - static struct ip_tunnel * ipip_tunnel_locate(struct net *net, 263 + static struct ip_tunnel *ipip_tunnel_locate(struct net *net, 264 264 struct ip_tunnel_parm *parms, int create) 265 265 { 266 266 __be32 remote = parms->iph.daddr;
+1 -1
net/ipv4/ping.c
··· 410 410 __wsum wcheck; 411 411 }; 412 412 413 - static int ping_getfrag(void *from, char * to, 413 + static int ping_getfrag(void *from, char *to, 414 414 int offset, int fraglen, int odd, struct sk_buff *skb) 415 415 { 416 416 struct pingfakehdr *pfh = (struct pingfakehdr *)from;
+1 -1
net/ipv4/raw.c
··· 288 288 read_unlock(&raw_v4_hashinfo.lock); 289 289 } 290 290 291 - static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb) 291 + static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb) 292 292 { 293 293 /* Charge it to the socket. */ 294 294
+5 -5
net/ipv4/route.c
··· 2215 2215 struct in_device *in_dev, 2216 2216 __be32 daddr, __be32 saddr, u32 tos) 2217 2217 { 2218 - struct rtable* rth = NULL; 2218 + struct rtable *rth = NULL; 2219 2219 int err; 2220 2220 unsigned hash; 2221 2221 ··· 2257 2257 struct flowi4 fl4; 2258 2258 unsigned flags = 0; 2259 2259 u32 itag = 0; 2260 - struct rtable * rth; 2260 + struct rtable *rth; 2261 2261 unsigned hash; 2262 2262 __be32 spec_dst; 2263 2263 int err = -EINVAL; 2264 - struct net * net = dev_net(dev); 2264 + struct net *net = dev_net(dev); 2265 2265 2266 2266 /* IP on this device is disabled. */ 2267 2267 ··· 2433 2433 int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr, 2434 2434 u8 tos, struct net_device *dev, bool noref) 2435 2435 { 2436 - struct rtable * rth; 2436 + struct rtable *rth; 2437 2437 unsigned hash; 2438 2438 int iif = dev->ifindex; 2439 2439 struct net *net; ··· 3068 3068 return -EMSGSIZE; 3069 3069 } 3070 3070 3071 - static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) 3071 + static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg) 3072 3072 { 3073 3073 struct net *net = sock_net(in_skb->sk); 3074 3074 struct rtmsg *rtm;
+1 -1
net/ipv4/tcp_probe.c
··· 138 138 .entry = jtcp_rcv_established, 139 139 }; 140 140 141 - static int tcpprobe_open(struct inode * inode, struct file * file) 141 + static int tcpprobe_open(struct inode *inode, struct file *file) 142 142 { 143 143 /* Reset (empty) log */ 144 144 spin_lock_bh(&tcp_probe.lock);
+1 -1
net/ipv4/udp.c
··· 847 847 * Get and verify the address. 848 848 */ 849 849 if (msg->msg_name) { 850 - struct sockaddr_in * usin = (struct sockaddr_in *)msg->msg_name; 850 + struct sockaddr_in *usin = (struct sockaddr_in *)msg->msg_name; 851 851 if (msg->msg_namelen < sizeof(*usin)) 852 852 return -EINVAL; 853 853 if (usin->sin_family != AF_INET) {
+1 -1
net/ipv4/udp_impl.h
··· 25 25 size_t len, int noblock, int flags, int *addr_len); 26 26 extern int udp_sendpage(struct sock *sk, struct page *page, int offset, 27 27 size_t size, int flags); 28 - extern int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb); 28 + extern int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); 29 29 extern void udp_destroy_sock(struct sock *sk); 30 30 31 31 #ifdef CONFIG_PROC_FS
+1 -1
net/ipv4/xfrm4_policy.c
··· 152 152 153 153 case IPPROTO_AH: 154 154 if (pskb_may_pull(skb, xprth + 8 - skb->data)) { 155 - __be32 *ah_hdr = (__be32*)xprth; 155 + __be32 *ah_hdr = (__be32 *)xprth; 156 156 157 157 fl4->fl4_ipsec_spi = ah_hdr[1]; 158 158 }