提交 78890ed7 编写于 作者: P Praveen Madhavan 提交者: David S. Miller

csiostor:fix sparse warnings

This patch fixes sparse warning reported by kbuild.
Apply this on net-next since it depends on previous commit.

drivers/scsi/csiostor/csio_hw.c:259:17: sparse: cast to restricted __le32
drivers/scsi/csiostor/csio_hw.c:536:31: sparse: incorrect type in assignment
(different base types)
drivers/scsi/csiostor/csio_hw.c:536:31:    expected unsigned int [unsigned]
[usertype] <noident>
drivers/scsi/csiostor/csio_hw.c:536:31:    got restricted __be32 [usertype]
<noident>
>> drivers/scsi/csiostor/csio_hw.c:2012:5: sparse: symbol 'csio_hw_prep_fw' was
not declared. Should it be static?
Signed-off-by: NPraveen Madhavan <praveenm@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d3b4b261
...@@ -256,7 +256,7 @@ csio_hw_seeprom_read(struct csio_hw *hw, uint32_t addr, uint32_t *data) ...@@ -256,7 +256,7 @@ csio_hw_seeprom_read(struct csio_hw *hw, uint32_t addr, uint32_t *data)
} }
pci_read_config_dword(hw->pdev, base + PCI_VPD_DATA, data); pci_read_config_dword(hw->pdev, base + PCI_VPD_DATA, data);
*data = le32_to_cpu(*data); *data = le32_to_cpu(*(__le32 *)data);
return 0; return 0;
} }
...@@ -533,7 +533,7 @@ csio_hw_read_flash(struct csio_hw *hw, uint32_t addr, uint32_t nwords, ...@@ -533,7 +533,7 @@ csio_hw_read_flash(struct csio_hw *hw, uint32_t addr, uint32_t nwords,
if (ret) if (ret)
return ret; return ret;
if (byte_oriented) if (byte_oriented)
*data = htonl(*data); *data = (__force __u32) htonl(*data);
} }
return 0; return 0;
} }
...@@ -2009,7 +2009,7 @@ static struct fw_info *find_fw_info(int chip) ...@@ -2009,7 +2009,7 @@ static struct fw_info *find_fw_info(int chip)
return NULL; return NULL;
} }
int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info, static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,
const u8 *fw_data, unsigned int fw_size, const u8 *fw_data, unsigned int fw_size,
struct fw_hdr *card_fw, enum csio_dev_state state, struct fw_hdr *card_fw, enum csio_dev_state state,
int *reset) int *reset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册