diff options
author | Naresh Kumar Inna <naresh@chelsio.com> | 2012-11-20 07:45:40 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-11-30 10:32:10 -0500 |
commit | 5036f0a0ecd31fc94360a944b352d082e1182b04 (patch) | |
tree | 98d5b957f1cd88b70b4965cf7dc16dc7862d0e42 /drivers/scsi/csiostor/csio_hw.c | |
parent | 68d91cbd5267e15a7c6da1415a1c65a9506aed96 (diff) |
[SCSI] csiostor: Fix sparse warnings.
This patch fixes sparse warnings related to endian-ness, which were
reported by the 0-day kernel build and testing tool.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/csiostor/csio_hw.c')
-rw-r--r-- | drivers/scsi/csiostor/csio_hw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index 963c6c1d68b7..8ecdb94a59f4 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c | |||
@@ -169,7 +169,7 @@ csio_set_reg_field(struct csio_hw *hw, uint32_t reg, uint32_t mask, | |||
169 | * is assigned the 64-bit ECC word for the read data. | 169 | * is assigned the 64-bit ECC word for the read data. |
170 | */ | 170 | */ |
171 | int | 171 | int |
172 | csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, uint32_t *data, | 172 | csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, __be32 *data, |
173 | uint64_t *ecc) | 173 | uint64_t *ecc) |
174 | { | 174 | { |
175 | int i; | 175 | int i; |
@@ -209,7 +209,7 @@ csio_hw_mc_read(struct csio_hw *hw, uint32_t addr, uint32_t *data, | |||
209 | * is assigned the 64-bit ECC word for the read data. | 209 | * is assigned the 64-bit ECC word for the read data. |
210 | */ | 210 | */ |
211 | int | 211 | int |
212 | csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, uint32_t *data, | 212 | csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, __be32 *data, |
213 | uint64_t *ecc) | 213 | uint64_t *ecc) |
214 | { | 214 | { |
215 | int i; | 215 | int i; |
@@ -249,7 +249,7 @@ csio_hw_edc_read(struct csio_hw *hw, int idx, uint32_t addr, uint32_t *data, | |||
249 | * address @addr. | 249 | * address @addr. |
250 | */ | 250 | */ |
251 | static int | 251 | static int |
252 | csio_mem_win_rw(struct csio_hw *hw, u32 addr, __be32 *data, int dir) | 252 | csio_mem_win_rw(struct csio_hw *hw, u32 addr, u32 *data, int dir) |
253 | { | 253 | { |
254 | int i; | 254 | int i; |
255 | 255 | ||
@@ -296,7 +296,7 @@ csio_memory_rw(struct csio_hw *hw, int mtype, u32 addr, u32 len, | |||
296 | { | 296 | { |
297 | uint32_t pos, start, end, offset, memoffset; | 297 | uint32_t pos, start, end, offset, memoffset; |
298 | int ret; | 298 | int ret; |
299 | __be32 *data; | 299 | uint32_t *data; |
300 | 300 | ||
301 | /* | 301 | /* |
302 | * Argument sanity checks ... | 302 | * Argument sanity checks ... |
@@ -379,7 +379,7 @@ csio_memory_rw(struct csio_hw *hw, int mtype, u32 addr, u32 len, | |||
379 | } | 379 | } |
380 | 380 | ||
381 | static int | 381 | static int |
382 | csio_memory_write(struct csio_hw *hw, int mtype, u32 addr, u32 len, __be32 *buf) | 382 | csio_memory_write(struct csio_hw *hw, int mtype, u32 addr, u32 len, u32 *buf) |
383 | { | 383 | { |
384 | return csio_memory_rw(hw, mtype, addr, len, buf, 0); | 384 | return csio_memory_rw(hw, mtype, addr, len, buf, 0); |
385 | } | 385 | } |
@@ -429,6 +429,7 @@ csio_hw_seeprom_read(struct csio_hw *hw, uint32_t addr, uint32_t *data) | |||
429 | 429 | ||
430 | pci_read_config_dword(hw->pdev, base + PCI_VPD_DATA, data); | 430 | pci_read_config_dword(hw->pdev, base + PCI_VPD_DATA, data); |
431 | *data = le32_to_cpu(*data); | 431 | *data = le32_to_cpu(*data); |
432 | |||
432 | return 0; | 433 | return 0; |
433 | } | 434 | } |
434 | 435 | ||
@@ -926,7 +927,7 @@ csio_hw_fw_dload(struct csio_hw *hw, uint8_t *fw_data, uint32_t size) | |||
926 | int ret; | 927 | int ret; |
927 | uint32_t i; | 928 | uint32_t i; |
928 | uint8_t first_page[SF_PAGE_SIZE]; | 929 | uint8_t first_page[SF_PAGE_SIZE]; |
929 | const uint32_t *p = (const uint32_t *)fw_data; | 930 | const __be32 *p = (const __be32 *)fw_data; |
930 | struct fw_hdr *hdr = (struct fw_hdr *)fw_data; | 931 | struct fw_hdr *hdr = (struct fw_hdr *)fw_data; |
931 | uint32_t sf_sec_size; | 932 | uint32_t sf_sec_size; |
932 | 933 | ||
@@ -2116,7 +2117,6 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path) | |||
2116 | const struct firmware *cf; | 2117 | const struct firmware *cf; |
2117 | struct pci_dev *pci_dev = hw->pdev; | 2118 | struct pci_dev *pci_dev = hw->pdev; |
2118 | struct device *dev = &pci_dev->dev; | 2119 | struct device *dev = &pci_dev->dev; |
2119 | |||
2120 | unsigned int mtype = 0, maddr = 0; | 2120 | unsigned int mtype = 0, maddr = 0; |
2121 | uint32_t *cfg_data; | 2121 | uint32_t *cfg_data; |
2122 | int value_to_add = 0; | 2122 | int value_to_add = 0; |