@@ -2091,7 +2091,6 @@ do { \
/* struct scsi_cmnd function return codes */
#define STATUS_BYTE(byte) (byte)
-#define MSG_BYTE(byte) ((byte) << 8)
#define ASC_STATS(shost, counter) ASC_STATS_ADD(shost, counter, 1)
#ifndef ADVANSYS_STATS
@@ -2365,7 +2365,7 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h,
case IOACCEL2_STATUS_SR_UNDERRUN:
cmd->result = 0;
set_host_byte(cmd, DID_OK); /* host byte */
- cmd->result |= (COMMAND_COMPLETE << 8); /* msg byte */
+ set_msg_byte(cmd, COMMAND_COMPLETE); /* msg byte */
ioaccel2_resid = get_unaligned_le32(
&c2->error_data.resid_cnt[0]);
scsi_set_resid(cmd, ioaccel2_resid);
@@ -2575,7 +2575,7 @@ static void complete_scsi_command(struct CommandList *cp)
cmd->result = 0;
set_host_byte(cmd, DID_OK); /* host byte */
- cmd->result |= (COMMAND_COMPLETE << 8); /* msg byte */
+ set_msg_byte(cmd, COMMAND_COMPLETE); /* msg byte */
if (cp->cmd_type == CMD_IOACCEL2 || cp->cmd_type == CMD_IOACCEL1) {
if (dev->physical_device && dev->expose_device &&
@@ -596,7 +596,7 @@ static void mesh_done(struct mesh_state *ms, int start_next)
if (cmd) {
set_scsi_result(cmd, 0, ms->stat, 0, cmd->SCp.Status);
if (ms->stat == DID_OK)
- cmd->result += (cmd->SCp.Message << 8);
+ set_msg_byte(cmd, cmd->SCp.Message);
if (DEBUG_TARGET(cmd)) {
printk(KERN_DEBUG "mesh_done: result = %x, data_ptr=%d, buflen=%d\n",
cmd->result, ms->data_ptr, scsi_bufflen(cmd));
<SmPL> @@ struct scsi_cmnd *c; expression E1, E2; @@ ( - c->result = E1 << 8 | E2; + c->result = 0; + set_msg_byte(c, E1); + c->result |= E2; | - c->result |= E1 << 8 | E2; + set_msg_byte(c, E1); + c->result |= E2; | - c->result = E1 << 8; + c->result = 0; + set_msg_byte(c, E1); | - c->result |= E1 << 8; + c->result = 0; + set_msg_byte(c, E1); | - c->result = (E1 << 8); + set_msg_byte(c, E1); | - c->result |= (E1 << 8); + set_msg_byte(c, E1); ) </SmPL> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> --- drivers/scsi/advansys.c | 1 - drivers/scsi/hpsa.c | 4 ++-- drivers/scsi/mesh.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)