aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSucheta Chakraborty <sucheta.chakraborty@qlogic.com>2010-10-04 00:20:14 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-05 01:46:51 -0400
commita1c0c459918e8c8ce152deba84f9ed27d7eb0e53 (patch)
treef537bd359d904669127840953191f600b2191a42 /drivers
parent7e56cac4b68805470849ba373dd313ba0e7cdb81 (diff)
qlcnic: sparse warning fixes
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/qlcnic/qlcnic_ctx.c12
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c10
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
index a4c4d091739e..75e3b19e35ee 100644
--- a/drivers/net/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/qlcnic/qlcnic_ctx.c
@@ -742,15 +742,15 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter,
742 742
743 if (err == QLCNIC_RCODE_SUCCESS) { 743 if (err == QLCNIC_RCODE_SUCCESS) {
744 for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++, npar++, pci_info++) { 744 for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++, npar++, pci_info++) {
745 pci_info->id = le32_to_cpu(npar->id); 745 pci_info->id = le16_to_cpu(npar->id);
746 pci_info->active = le32_to_cpu(npar->active); 746 pci_info->active = le16_to_cpu(npar->active);
747 pci_info->type = le32_to_cpu(npar->type); 747 pci_info->type = le16_to_cpu(npar->type);
748 pci_info->default_port = 748 pci_info->default_port =
749 le32_to_cpu(npar->default_port); 749 le16_to_cpu(npar->default_port);
750 pci_info->tx_min_bw = 750 pci_info->tx_min_bw =
751 le32_to_cpu(npar->tx_min_bw); 751 le16_to_cpu(npar->tx_min_bw);
752 pci_info->tx_max_bw = 752 pci_info->tx_max_bw =
753 le32_to_cpu(npar->tx_max_bw); 753 le16_to_cpu(npar->tx_max_bw);
754 memcpy(pci_info->mac, npar->mac, ETH_ALEN); 754 memcpy(pci_info->mac, npar->mac, ETH_ALEN);
755 } 755 }
756 } else { 756 } else {
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 6001f41a70ad..59a213814334 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -521,9 +521,9 @@ qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
521 pfn = pci_info[i].id; 521 pfn = pci_info[i].id;
522 if (pfn > QLCNIC_MAX_PCI_FUNC) 522 if (pfn > QLCNIC_MAX_PCI_FUNC)
523 return QL_STATUS_INVALID_PARAM; 523 return QL_STATUS_INVALID_PARAM;
524 adapter->npars[pfn].active = pci_info[i].active; 524 adapter->npars[pfn].active = (u8)pci_info[i].active;
525 adapter->npars[pfn].type = pci_info[i].type; 525 adapter->npars[pfn].type = (u8)pci_info[i].type;
526 adapter->npars[pfn].phy_port = pci_info[i].default_port; 526 adapter->npars[pfn].phy_port = (u8)pci_info[i].default_port;
527 adapter->npars[pfn].min_bw = pci_info[i].tx_min_bw; 527 adapter->npars[pfn].min_bw = pci_info[i].tx_min_bw;
528 adapter->npars[pfn].max_bw = pci_info[i].tx_max_bw; 528 adapter->npars[pfn].max_bw = pci_info[i].tx_max_bw;
529 } 529 }
@@ -723,7 +723,7 @@ qlcnic_initialize_nic(struct qlcnic_adapter *adapter)
723 if (err) 723 if (err)
724 return err; 724 return err;
725 725
726 adapter->physical_port = nic_info.phys_port; 726 adapter->physical_port = (u8)nic_info.phys_port;
727 adapter->switch_mode = nic_info.switch_mode; 727 adapter->switch_mode = nic_info.switch_mode;
728 adapter->max_tx_ques = nic_info.max_tx_ques; 728 adapter->max_tx_ques = nic_info.max_tx_ques;
729 adapter->max_rx_ques = nic_info.max_rx_ques; 729 adapter->max_rx_ques = nic_info.max_rx_ques;
@@ -3762,7 +3762,7 @@ qlcnic_sysfs_read_npar_config(struct file *file, struct kobject *kobj,
3762 return ret; 3762 return ret;
3763 3763
3764 np_cfg[i].pci_func = i; 3764 np_cfg[i].pci_func = i;
3765 np_cfg[i].op_mode = nic_info.op_mode; 3765 np_cfg[i].op_mode = (u8)nic_info.op_mode;
3766 np_cfg[i].port_num = nic_info.phys_port; 3766 np_cfg[i].port_num = nic_info.phys_port;
3767 np_cfg[i].fw_capab = nic_info.capabilities; 3767 np_cfg[i].fw_capab = nic_info.capabilities;
3768 np_cfg[i].min_bw = nic_info.min_tx_bw ; 3768 np_cfg[i].min_bw = nic_info.min_tx_bw ;