Skip to content

Commit

Permalink
[SCSI] megaraid: cleanup type issue in mega_build_cmd()
Browse files Browse the repository at this point in the history
On 64 bit systems the current code sets 32 bits of "seg" and leaves the
other 32 uninitialized.  It doesn't matter since the variable is never
used.  But it's still messy and we should fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Jul 20, 2012
1 parent a5254db commit 9d5d93e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/megaraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
mega_passthru *pthru;
scb_t *scb;
mbox_t *mbox;
long seg;
u32 seg;
char islogical;
int max_ldrv_num;
int channel = 0;
Expand Down Expand Up @@ -858,7 +858,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)

/* Calculate Scatter-Gather info */
mbox->m_out.numsgelements = mega_build_sglist(adapter, scb,
(u32 *)&mbox->m_out.xferaddr, (u32 *)&seg);
(u32 *)&mbox->m_out.xferaddr, &seg);

return scb;

Expand Down

0 comments on commit 9d5d93e

Please sign in to comment.