Commit c6f5bf81 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

megaraid_sas : add endianness conversions for all ones

Add noop conversions for all ones to make sparse happy.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSumit Saxena <sumit.saxena@avagotech.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 9ab9ed38
...@@ -1219,7 +1219,7 @@ megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp, ...@@ -1219,7 +1219,7 @@ megasas_build_dcdb(struct megasas_instance *instance, struct scsi_cmnd *scp,
*/ */
if (scp->device->type == TYPE_TAPE) { if (scp->device->type == TYPE_TAPE) {
if ((scp->request->timeout / HZ) > 0xFFFF) if ((scp->request->timeout / HZ) > 0xFFFF)
pthru->timeout = 0xFFFF; pthru->timeout = cpu_to_le16(0xFFFF);
else else
pthru->timeout = cpu_to_le16(scp->request->timeout / HZ); pthru->timeout = cpu_to_le16(scp->request->timeout / HZ);
} }
......
...@@ -769,7 +769,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, ...@@ -769,7 +769,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
if (pd != MR_PD_INVALID) if (pd != MR_PD_INVALID)
*pDevHandle = MR_PdDevHandleGet(pd, map); *pDevHandle = MR_PdDevHandleGet(pd, map);
else { else {
*pDevHandle = MR_PD_INVALID; *pDevHandle = cpu_to_le16(MR_PD_INVALID);
if ((raid->level >= 5) && if ((raid->level >= 5) &&
(!do_invader || (do_invader && (!do_invader || (do_invader &&
(raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) (raid->regTypeReqOnRead != REGION_TYPE_UNUSED))))
...@@ -864,7 +864,8 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, ...@@ -864,7 +864,8 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
/* Get dev handle from Pd. */ /* Get dev handle from Pd. */
*pDevHandle = MR_PdDevHandleGet(pd, map); *pDevHandle = MR_PdDevHandleGet(pd, map);
else { else {
*pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */ /* set dev handle as invalid. */
*pDevHandle = cpu_to_le16(MR_PD_INVALID);
if ((raid->level >= 5) && if ((raid->level >= 5) &&
(!do_invader || (do_invader && (!do_invader || (do_invader &&
(raid->regTypeReqOnRead != REGION_TYPE_UNUSED)))) (raid->regTypeReqOnRead != REGION_TYPE_UNUSED))))
...@@ -1109,7 +1110,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1109,7 +1110,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
ref_in_start_stripe, io_info, ref_in_start_stripe, io_info,
pRAID_Context, map); pRAID_Context, map);
/* If IO on an invalid Pd, then FP is not possible.*/ /* If IO on an invalid Pd, then FP is not possible.*/
if (io_info->devHandle == MR_PD_INVALID) if (io_info->devHandle == cpu_to_le16(MR_PD_INVALID))
io_info->fpOkForIo = FALSE; io_info->fpOkForIo = FALSE;
return retval; return retval;
} else if (isRead) { } else if (isRead) {
......
...@@ -415,7 +415,7 @@ megasas_alloc_cmds_fusion(struct megasas_instance *instance) ...@@ -415,7 +415,7 @@ megasas_alloc_cmds_fusion(struct megasas_instance *instance)
reply_desc = fusion->reply_frames_desc; reply_desc = fusion->reply_frames_desc;
for (i = 0; i < fusion->reply_q_depth * count; i++, reply_desc++) for (i = 0; i < fusion->reply_q_depth * count; i++, reply_desc++)
reply_desc->Words = ULLONG_MAX; reply_desc->Words = cpu_to_le64(ULLONG_MAX);
io_frames_sz = fusion->io_frames_alloc_sz; io_frames_sz = fusion->io_frames_alloc_sz;
...@@ -1997,7 +1997,8 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex) ...@@ -1997,7 +1997,8 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
num_completed = 0; num_completed = 0;
while ((d_val.u.low != UINT_MAX) && (d_val.u.high != UINT_MAX)) { while (d_val.u.low != cpu_to_le32(UINT_MAX) &&
d_val.u.high != cpu_to_le32(UINT_MAX)) {
smid = le16_to_cpu(reply_desc->SMID); smid = le16_to_cpu(reply_desc->SMID);
cmd_fusion = fusion->cmd_list[smid - 1]; cmd_fusion = fusion->cmd_list[smid - 1];
...@@ -2061,7 +2062,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex) ...@@ -2061,7 +2062,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
fusion->reply_q_depth) fusion->reply_q_depth)
fusion->last_reply_idx[MSIxIndex] = 0; fusion->last_reply_idx[MSIxIndex] = 0;
desc->Words = ULLONG_MAX; desc->Words = cpu_to_le64(ULLONG_MAX);
num_completed++; num_completed++;
threshold_reply_count++; threshold_reply_count++;
...@@ -2488,7 +2489,7 @@ void megasas_reset_reply_desc(struct megasas_instance *instance) ...@@ -2488,7 +2489,7 @@ void megasas_reset_reply_desc(struct megasas_instance *instance)
fusion->last_reply_idx[i] = 0; fusion->last_reply_idx[i] = 0;
reply_desc = fusion->reply_frames_desc; reply_desc = fusion->reply_frames_desc;
for (i = 0 ; i < fusion->reply_q_depth * count; i++, reply_desc++) for (i = 0 ; i < fusion->reply_q_depth * count; i++, reply_desc++)
reply_desc->Words = ULLONG_MAX; reply_desc->Words = cpu_to_le64(ULLONG_MAX);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment