Merge tag 'hwspinlock-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad...
[firefly-linux-kernel-4.4.55.git] / net / 6lowpan / iphc.c
index e6cf68e8667fbc6ecd1b411d3cd5efc0d5a919ac..142eef55c9e2d92c180786d9919ded72536d94ba 100644 (file)
@@ -296,7 +296,6 @@ static int uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
                default:
                        pr_debug("ERROR: unknown UDP format\n");
                        goto err;
-                       break;
                }
 
                pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
@@ -408,9 +407,9 @@ int lowpan_process_data(struct sk_buff *skb, struct net_device *dev,
        }
 
        /* Hop Limit */
-       if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I)
+       if ((iphc0 & 0x03) != LOWPAN_IPHC_TTL_I) {
                hdr.hop_limit = lowpan_ttl_values[iphc0 & 0x03];
-       else {
+       else {
                if (lowpan_fetch_skb(skb, &hdr.hop_limit,
                                     sizeof(hdr.hop_limit)))
                        goto drop;
@@ -643,11 +642,11 @@ int lowpan_header_compress(struct sk_buff *skb, struct net_device *dev,
        tmp = ((tmp & 0x03) << 6) | (tmp >> 2);
 
        if (((hdr->flow_lbl[0] & 0x0F) == 0) &&
-            (hdr->flow_lbl[1] == 0) && (hdr->flow_lbl[2] == 0)) {
+           (hdr->flow_lbl[1] == 0) && (hdr->flow_lbl[2] == 0)) {
                /* flow label can be compressed */
                iphc0 |= LOWPAN_IPHC_FL_C;
                if ((hdr->priority == 0) &&
-                  ((hdr->flow_lbl[0] & 0xF0) == 0)) {
+                   ((hdr->flow_lbl[0] & 0xF0) == 0)) {
                        /* compress (elide) all */
                        iphc0 |= LOWPAN_IPHC_TC_C;
                } else {
@@ -658,7 +657,7 @@ int lowpan_header_compress(struct sk_buff *skb, struct net_device *dev,
        } else {
                /* Flow label cannot be compressed */
                if ((hdr->priority == 0) &&
-                  ((hdr->flow_lbl[0] & 0xF0) == 0)) {
+                   ((hdr->flow_lbl[0] & 0xF0) == 0)) {
                        /* compress only traffic class */
                        iphc0 |= LOWPAN_IPHC_TC_C;
                        *hc_ptr = (tmp & 0xc0) | (hdr->flow_lbl[0] & 0x0F);