Commit 6378c025 authored by Eilon Greenstein's avatar Eilon Greenstein Committed by David S. Miller

bnx2x: Checkpatch compliance

Checkpatch compliance
The latest version of checkpatch found the following style errors in the
code
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33471629
...@@ -40,20 +40,20 @@ ...@@ -40,20 +40,20 @@
#define DP(__mask, __fmt, __args...) do { \ #define DP(__mask, __fmt, __args...) do { \
if (bp->msglevel & (__mask)) \ if (bp->msglevel & (__mask)) \
printk(DP_LEVEL "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ printk(DP_LEVEL "[%s:%d(%s)]" __fmt, __func__, __LINE__, \
bp->dev?(bp->dev->name):"?", ##__args); \ bp->dev ? (bp->dev->name) : "?", ##__args); \
} while (0) } while (0)
/* errors debug print */ /* errors debug print */
#define BNX2X_DBG_ERR(__fmt, __args...) do { \ #define BNX2X_DBG_ERR(__fmt, __args...) do { \
if (bp->msglevel & NETIF_MSG_PROBE) \ if (bp->msglevel & NETIF_MSG_PROBE) \
printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \
bp->dev?(bp->dev->name):"?", ##__args); \ bp->dev ? (bp->dev->name) : "?", ##__args); \
} while (0) } while (0)
/* for errors (never masked) */ /* for errors (never masked) */
#define BNX2X_ERR(__fmt, __args...) do { \ #define BNX2X_ERR(__fmt, __args...) do { \
printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \
bp->dev?(bp->dev->name):"?", ##__args); \ bp->dev ? (bp->dev->name) : "?", ##__args); \
} while (0) } while (0)
/* before we have a dev->name use dev_info() */ /* before we have a dev->name use dev_info() */
......
This diff is collapsed.
...@@ -72,26 +72,26 @@ ...@@ -72,26 +72,26 @@
struct raw_op { struct raw_op {
u32 op :8; u32 op:8;
u32 offset :24; u32 offset:24;
u32 raw_data; u32 raw_data;
}; };
struct op_read { struct op_read {
u32 op :8; u32 op:8;
u32 offset :24; u32 offset:24;
u32 pad; u32 pad;
}; };
struct op_write { struct op_write {
u32 op :8; u32 op:8;
u32 offset :24; u32 offset:24;
u32 val; u32 val;
}; };
struct op_string_write { struct op_string_write {
u32 op :8; u32 op:8;
u32 offset :24; u32 offset:24;
#ifdef __LITTLE_ENDIAN #ifdef __LITTLE_ENDIAN
u16 data_off; u16 data_off;
u16 data_len; u16 data_len;
...@@ -102,8 +102,8 @@ struct op_string_write { ...@@ -102,8 +102,8 @@ struct op_string_write {
}; };
struct op_zero { struct op_zero {
u32 op :8; u32 op:8;
u32 offset :24; u32 offset:24;
u32 len; u32 len;
}; };
......
...@@ -755,10 +755,10 @@ static u32 bnx2x_get_emac_base(u32 ext_phy_type, u8 port) ...@@ -755,10 +755,10 @@ static u32 bnx2x_get_emac_base(u32 ext_phy_type, u8 port)
emac_base = GRCBASE_EMAC0; emac_base = GRCBASE_EMAC0;
break; break;
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073: case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073:
emac_base = (port) ? GRCBASE_EMAC0: GRCBASE_EMAC1; emac_base = (port) ? GRCBASE_EMAC0 : GRCBASE_EMAC1;
break; break;
default: default:
emac_base = (port) ? GRCBASE_EMAC1: GRCBASE_EMAC0; emac_base = (port) ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
break; break;
} }
return emac_base; return emac_base;
...@@ -4505,7 +4505,7 @@ static void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, u8 port, u8 phy_addr) ...@@ -4505,7 +4505,7 @@ static void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, u8 port, u8 phy_addr)
} }
#define RESERVED_SIZE 256 #define RESERVED_SIZE 256
/* max application is 160K bytes - data at end of RAM */ /* max application is 160K bytes - data at end of RAM */
#define MAX_APP_SIZE 160*1024 - RESERVED_SIZE #define MAX_APP_SIZE (160*1024 - RESERVED_SIZE)
/* Header is 14 bytes */ /* Header is 14 bytes */
#define HEADER_SIZE 14 #define HEADER_SIZE 14
......
...@@ -1858,14 +1858,14 @@ static int bnx2x_set_spio(struct bnx2x *bp, int spio_num, u32 mode) ...@@ -1858,14 +1858,14 @@ static int bnx2x_set_spio(struct bnx2x *bp, int spio_num, u32 mode)
spio_reg = (REG_RD(bp, MISC_REG_SPIO) & MISC_REGISTERS_SPIO_FLOAT); spio_reg = (REG_RD(bp, MISC_REG_SPIO) & MISC_REGISTERS_SPIO_FLOAT);
switch (mode) { switch (mode) {
case MISC_REGISTERS_SPIO_OUTPUT_LOW : case MISC_REGISTERS_SPIO_OUTPUT_LOW:
DP(NETIF_MSG_LINK, "Set SPIO %d -> output low\n", spio_num); DP(NETIF_MSG_LINK, "Set SPIO %d -> output low\n", spio_num);
/* clear FLOAT and set CLR */ /* clear FLOAT and set CLR */
spio_reg &= ~(spio_mask << MISC_REGISTERS_SPIO_FLOAT_POS); spio_reg &= ~(spio_mask << MISC_REGISTERS_SPIO_FLOAT_POS);
spio_reg |= (spio_mask << MISC_REGISTERS_SPIO_CLR_POS); spio_reg |= (spio_mask << MISC_REGISTERS_SPIO_CLR_POS);
break; break;
case MISC_REGISTERS_SPIO_OUTPUT_HIGH : case MISC_REGISTERS_SPIO_OUTPUT_HIGH:
DP(NETIF_MSG_LINK, "Set SPIO %d -> output high\n", spio_num); DP(NETIF_MSG_LINK, "Set SPIO %d -> output high\n", spio_num);
/* clear FLOAT and set SET */ /* clear FLOAT and set SET */
spio_reg &= ~(spio_mask << MISC_REGISTERS_SPIO_FLOAT_POS); spio_reg &= ~(spio_mask << MISC_REGISTERS_SPIO_FLOAT_POS);
...@@ -3782,7 +3782,7 @@ static void bnx2x_stats_update(struct bnx2x *bp) ...@@ -3782,7 +3782,7 @@ static void bnx2x_stats_update(struct bnx2x *bp)
bp->fp->rx_comp_cons), bp->fp->rx_comp_cons),
le16_to_cpu(*bp->fp->rx_cons_sb), nstats->rx_packets); le16_to_cpu(*bp->fp->rx_cons_sb), nstats->rx_packets);
printk(KERN_DEBUG " %s (Xoff events %u) brb drops %u\n", printk(KERN_DEBUG " %s (Xoff events %u) brb drops %u\n",
netif_queue_stopped(bp->dev)? "Xoff" : "Xon", netif_queue_stopped(bp->dev) ? "Xoff" : "Xon",
estats->driver_xoff, estats->brb_drop_lo); estats->driver_xoff, estats->brb_drop_lo);
printk(KERN_DEBUG "tstats: checksum_discard %u " printk(KERN_DEBUG "tstats: checksum_discard %u "
"packets_too_big_discard %u no_buff_discard %u " "packets_too_big_discard %u no_buff_discard %u "
...@@ -9610,7 +9610,7 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -9610,7 +9610,7 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_bd->addr_hi = cpu_to_le32(U64_HI(mapping)); tx_bd->addr_hi = cpu_to_le32(U64_HI(mapping));
tx_bd->addr_lo = cpu_to_le32(U64_LO(mapping)); tx_bd->addr_lo = cpu_to_le32(U64_LO(mapping));
nbd = skb_shinfo(skb)->nr_frags + ((pbd == NULL)? 1 : 2); nbd = skb_shinfo(skb)->nr_frags + ((pbd == NULL) ? 1 : 2);
tx_bd->nbd = cpu_to_le16(nbd); tx_bd->nbd = cpu_to_le16(nbd);
tx_bd->nbytes = cpu_to_le16(skb_headlen(skb)); tx_bd->nbytes = cpu_to_le16(skb_headlen(skb));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment