diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-07-02 02:06:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-03 22:10:51 -0400 |
commit | e332471c035708441de89d4c59f7f7cdc2700c0d (patch) | |
tree | 429a1f8c5bde77eab39745e333713b40dee8922c /drivers/net/qlge/qlge_main.c | |
parent | 6a47330892e697ae27d2d56a3c4c7fec2015be93 (diff) |
qlge: Fix sizeof usage.
Some usage was only sizing a pointer rather than the data type.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 35ba95a9b5db..5768af17f168 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -2156,7 +2156,7 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev) | |||
2156 | } | 2156 | } |
2157 | tx_ring_desc = &tx_ring->q[tx_ring->prod_idx]; | 2157 | tx_ring_desc = &tx_ring->q[tx_ring->prod_idx]; |
2158 | mac_iocb_ptr = tx_ring_desc->queue_entry; | 2158 | mac_iocb_ptr = tx_ring_desc->queue_entry; |
2159 | memset((void *)mac_iocb_ptr, 0, sizeof(mac_iocb_ptr)); | 2159 | memset((void *)mac_iocb_ptr, 0, sizeof(*mac_iocb_ptr)); |
2160 | 2160 | ||
2161 | mac_iocb_ptr->opcode = OPCODE_OB_MAC_IOCB; | 2161 | mac_iocb_ptr->opcode = OPCODE_OB_MAC_IOCB; |
2162 | mac_iocb_ptr->tid = tx_ring_desc->index; | 2162 | mac_iocb_ptr->tid = tx_ring_desc->index; |
@@ -2795,7 +2795,7 @@ static int ql_start_tx_ring(struct ql_adapter *qdev, struct tx_ring *tx_ring) | |||
2795 | 2795 | ||
2796 | ql_init_tx_ring(qdev, tx_ring); | 2796 | ql_init_tx_ring(qdev, tx_ring); |
2797 | 2797 | ||
2798 | err = ql_write_cfg(qdev, wqicb, sizeof(wqicb), CFG_LRQ, | 2798 | err = ql_write_cfg(qdev, wqicb, sizeof(*wqicb), CFG_LRQ, |
2799 | (u16) tx_ring->wq_id); | 2799 | (u16) tx_ring->wq_id); |
2800 | if (err) { | 2800 | if (err) { |
2801 | QPRINTK(qdev, IFUP, ERR, "Failed to load tx_ring.\n"); | 2801 | QPRINTK(qdev, IFUP, ERR, "Failed to load tx_ring.\n"); |
@@ -3060,7 +3060,7 @@ static int ql_start_rss(struct ql_adapter *qdev) | |||
3060 | int i; | 3060 | int i; |
3061 | u8 *hash_id = (u8 *) ricb->hash_cq_id; | 3061 | u8 *hash_id = (u8 *) ricb->hash_cq_id; |
3062 | 3062 | ||
3063 | memset((void *)ricb, 0, sizeof(ricb)); | 3063 | memset((void *)ricb, 0, sizeof(*ricb)); |
3064 | 3064 | ||
3065 | ricb->base_cq = qdev->rss_ring_first_cq_id | RSS_L4K; | 3065 | ricb->base_cq = qdev->rss_ring_first_cq_id | RSS_L4K; |
3066 | ricb->flags = | 3066 | ricb->flags = |
@@ -3082,7 +3082,7 @@ static int ql_start_rss(struct ql_adapter *qdev) | |||
3082 | 3082 | ||
3083 | QPRINTK(qdev, IFUP, DEBUG, "Initializing RSS.\n"); | 3083 | QPRINTK(qdev, IFUP, DEBUG, "Initializing RSS.\n"); |
3084 | 3084 | ||
3085 | status = ql_write_cfg(qdev, ricb, sizeof(ricb), CFG_LR, 0); | 3085 | status = ql_write_cfg(qdev, ricb, sizeof(*ricb), CFG_LR, 0); |
3086 | if (status) { | 3086 | if (status) { |
3087 | QPRINTK(qdev, IFUP, ERR, "Failed to load RICB.\n"); | 3087 | QPRINTK(qdev, IFUP, ERR, "Failed to load RICB.\n"); |
3088 | return status; | 3088 | return status; |
@@ -3489,7 +3489,7 @@ static int ql_configure_rings(struct ql_adapter *qdev) | |||
3489 | 3489 | ||
3490 | for (i = 0; i < qdev->tx_ring_count; i++) { | 3490 | for (i = 0; i < qdev->tx_ring_count; i++) { |
3491 | tx_ring = &qdev->tx_ring[i]; | 3491 | tx_ring = &qdev->tx_ring[i]; |
3492 | memset((void *)tx_ring, 0, sizeof(tx_ring)); | 3492 | memset((void *)tx_ring, 0, sizeof(*tx_ring)); |
3493 | tx_ring->qdev = qdev; | 3493 | tx_ring->qdev = qdev; |
3494 | tx_ring->wq_id = i; | 3494 | tx_ring->wq_id = i; |
3495 | tx_ring->wq_len = qdev->tx_ring_size; | 3495 | tx_ring->wq_len = qdev->tx_ring_size; |
@@ -3505,7 +3505,7 @@ static int ql_configure_rings(struct ql_adapter *qdev) | |||
3505 | 3505 | ||
3506 | for (i = 0; i < qdev->rx_ring_count; i++) { | 3506 | for (i = 0; i < qdev->rx_ring_count; i++) { |
3507 | rx_ring = &qdev->rx_ring[i]; | 3507 | rx_ring = &qdev->rx_ring[i]; |
3508 | memset((void *)rx_ring, 0, sizeof(rx_ring)); | 3508 | memset((void *)rx_ring, 0, sizeof(*rx_ring)); |
3509 | rx_ring->qdev = qdev; | 3509 | rx_ring->qdev = qdev; |
3510 | rx_ring->cq_id = i; | 3510 | rx_ring->cq_id = i; |
3511 | rx_ring->cpu = i % cpu_cnt; /* CPU to run handler on. */ | 3511 | rx_ring->cpu = i % cpu_cnt; /* CPU to run handler on. */ |
@@ -3864,7 +3864,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev, | |||
3864 | int pos, err = 0; | 3864 | int pos, err = 0; |
3865 | u16 val16; | 3865 | u16 val16; |
3866 | 3866 | ||
3867 | memset((void *)qdev, 0, sizeof(qdev)); | 3867 | memset((void *)qdev, 0, sizeof(*qdev)); |
3868 | err = pci_enable_device(pdev); | 3868 | err = pci_enable_device(pdev); |
3869 | if (err) { | 3869 | if (err) { |
3870 | dev_err(&pdev->dev, "PCI device enable failed.\n"); | 3870 | dev_err(&pdev->dev, "PCI device enable failed.\n"); |