Merge master.kernel.org:/home/rmk/linux-2.6-mmc
[powerpc.git] / net / ipv4 / icmp.c
index 90dca71..e3eceec 100644 (file)
@@ -934,11 +934,11 @@ int icmp_rcv(struct sk_buff *skb)
        case CHECKSUM_HW:
                if (!(u16)csum_fold(skb->csum))
                        break;
-               LIMIT_NETDEBUG(KERN_DEBUG "icmp v4 hw csum failure\n");
+               /* fall through */
        case CHECKSUM_NONE:
-               if ((u16)csum_fold(skb_checksum(skb, 0, skb->len, 0)))
+               skb->csum = 0;
+               if (__skb_checksum_complete(skb))
                        goto error;
-       default:;
        }
 
        if (!pskb_pull(skb, sizeof(struct icmphdr)))
@@ -1108,12 +1108,9 @@ void __init icmp_init(struct net_proto_family *ops)
        struct inet_sock *inet;
        int i;
 
-       for (i = 0; i < NR_CPUS; i++) {
+       for_each_cpu(i) {
                int err;
 
-               if (!cpu_possible(i))
-                       continue;
-
                err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_ICMP,
                                       &per_cpu(__icmp_socket, i));