net: nps_enet: fix coding style issues
authorElad Kanfi <eladkan@mellanox.com>
Wed, 13 Jul 2016 13:58:06 +0000 (16:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Jul 2016 03:59:06 +0000 (20:59 -0700)
Fix following coding style problems :

ERROR: else should follow close brace '}'
+ }
+ else { /* !dst_is_aligned */

WARNING: Missing a blank line after declarations
+ u32 buf = nps_enet_reg_get(priv, NPS_ENET_REG_RX_BUF);
+ put_unaligned_be32(buf, reg);

WARNING: Missing a blank line after declarations
+ u32 buf;
+ ioread32_rep(priv->regs_base + NPS_ENET_REG_RX_BUF, &buf, 1);

CHECK: Blank lines aren't necessary before a close brace '}'
+
+ }

total: 1 errors, 2 warnings, 1 checks, 683 lines checked

Signed-off-by: Elad Kanfi <eladkan@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ezchip/nps_enet.c

index 06f031715b578c897863c906b07176589b862f07..b182e2a4ecb7c0e9c12ac8ed40da3adaf280616f 100644 (file)
@@ -46,16 +46,17 @@ static void nps_enet_read_rx_fifo(struct net_device *ndev,
        if (dst_is_aligned) {
                ioread32_rep(priv->regs_base + NPS_ENET_REG_RX_BUF, reg, len);
                reg += len;
-       }
-       else { /* !dst_is_aligned */
+       } else { /* !dst_is_aligned */
                for (i = 0; i < len; i++, reg++) {
                        u32 buf = nps_enet_reg_get(priv, NPS_ENET_REG_RX_BUF);
+
                        put_unaligned_be32(buf, reg);
                }
        }
        /* copy last bytes (if any) */
        if (last) {
                u32 buf;
+
                ioread32_rep(priv->regs_base + NPS_ENET_REG_RX_BUF, &buf, 1);
                memcpy((u8 *)reg, &buf, last);
        }
@@ -459,7 +460,6 @@ static void nps_enet_set_rx_mode(struct net_device *ndev)
                         | NPS_ENET_ENABLE << CFG_2_DISK_DA_SHIFT;
                ge_mac_cfg_2_value = (ge_mac_cfg_2_value & ~CFG_2_DISK_MC_MASK)
                         | NPS_ENET_ENABLE << CFG_2_DISK_MC_SHIFT;
-
        }
 
        nps_enet_reg_set(priv, NPS_ENET_REG_GE_MAC_CFG_2, ge_mac_cfg_2_value);