diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-06-25 01:50:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-25 05:46:05 -0400 |
commit | c957d09ffda417f6c8e3d1f10e2b05228607d6d7 (patch) | |
tree | 5405eaf7d2a04a52e4f71384959f42ecbc281a5c /drivers/net/ethernet | |
parent | 6da334ee0c101fc5ecf62f2b1e11b1524be7b159 (diff) |
bnx2x: Remove sparse and coccinelle warnings
This patch solves several sparse issues as well as an unneeded semicolon
found via coccinelle.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 9 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index d342c5a34afc..ec3aa1d451e8 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -1722,7 +1722,7 @@ static int bnx2x_req_irq(struct bnx2x *bp) | |||
1722 | return request_irq(irq, bnx2x_interrupt, flags, bp->dev->name, bp->dev); | 1722 | return request_irq(irq, bnx2x_interrupt, flags, bp->dev->name, bp->dev); |
1723 | } | 1723 | } |
1724 | 1724 | ||
1725 | int bnx2x_setup_irqs(struct bnx2x *bp) | 1725 | static int bnx2x_setup_irqs(struct bnx2x *bp) |
1726 | { | 1726 | { |
1727 | int rc = 0; | 1727 | int rc = 0; |
1728 | if (bp->flags & USING_MSIX_FLAG && | 1728 | if (bp->flags & USING_MSIX_FLAG && |
@@ -3543,9 +3543,12 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb, | |||
3543 | /* outer IP header info */ | 3543 | /* outer IP header info */ |
3544 | if (xmit_type & XMIT_CSUM_V4) { | 3544 | if (xmit_type & XMIT_CSUM_V4) { |
3545 | struct iphdr *iph = ip_hdr(skb); | 3545 | struct iphdr *iph = ip_hdr(skb); |
3546 | u16 csum = (__force u16)(~iph->check) - | ||
3547 | (__force u16)iph->tot_len - | ||
3548 | (__force u16)iph->frag_off; | ||
3549 | |||
3546 | pbd2->fw_ip_csum_wo_len_flags_frag = | 3550 | pbd2->fw_ip_csum_wo_len_flags_frag = |
3547 | bswab16(csum_fold((~iph->check) - | 3551 | bswab16(csum_fold((__force __wsum)csum)); |
3548 | iph->tot_len - iph->frag_off)); | ||
3549 | } else { | 3552 | } else { |
3550 | pbd2->fw_ip_hdr_to_payload_w = | 3553 | pbd2->fw_ip_hdr_to_payload_w = |
3551 | hlen_w - ((sizeof(struct ipv6hdr)) >> 1); | 3554 | hlen_w - ((sizeof(struct ipv6hdr)) >> 1); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 7c6faebb1838..b8c067d1a0f2 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -1391,7 +1391,7 @@ static bool bnx2x_is_nvm_accessible(struct bnx2x *bp) | |||
1391 | bp->pm_cap + PCI_PM_CTRL, &pm); | 1391 | bp->pm_cap + PCI_PM_CTRL, &pm); |
1392 | 1392 | ||
1393 | if ((rc && !netif_running(dev)) || | 1393 | if ((rc && !netif_running(dev)) || |
1394 | (!rc && ((pm & PCI_PM_CTRL_STATE_MASK) != PCI_D0))) | 1394 | (!rc && ((pm & PCI_PM_CTRL_STATE_MASK) != (__force u16)PCI_D0))) |
1395 | return false; | 1395 | return false; |
1396 | 1396 | ||
1397 | return true; | 1397 | return true; |
@@ -1610,8 +1610,10 @@ static int bnx2x_nvram_write1(struct bnx2x *bp, u32 offset, u8 *data_buf, | |||
1610 | */ | 1610 | */ |
1611 | val = be32_to_cpu(val_be); | 1611 | val = be32_to_cpu(val_be); |
1612 | 1612 | ||
1613 | val &= ~le32_to_cpu(0xff << BYTE_OFFSET(offset)); | 1613 | val &= ~le32_to_cpu((__force __le32) |
1614 | val |= le32_to_cpu(*data_buf << BYTE_OFFSET(offset)); | 1614 | (0xff << BYTE_OFFSET(offset))); |
1615 | val |= le32_to_cpu((__force __le32) | ||
1616 | (*data_buf << BYTE_OFFSET(offset))); | ||
1615 | 1617 | ||
1616 | rc = bnx2x_nvram_write_dword(bp, align_offset, val, | 1618 | rc = bnx2x_nvram_write_dword(bp, align_offset, val, |
1617 | cmd_flags); | 1619 | cmd_flags); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 73189888766d..740518bbcb5f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -615,7 +615,7 @@ void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32) | |||
615 | if (rc) { | 615 | if (rc) { |
616 | BNX2X_ERR("DMAE returned failure %d\n", rc); | 616 | BNX2X_ERR("DMAE returned failure %d\n", rc); |
617 | bnx2x_panic(); | 617 | bnx2x_panic(); |
618 | }; | 618 | } |
619 | } | 619 | } |
620 | 620 | ||
621 | static void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr, | 621 | static void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr, |