[SCSI] megaraid: cleanup type issue in mega_build_cmd()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 27 Jun 2012 09:08:25 +0000 (12:08 +0300)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 20 Jul 2012 07:58:38 +0000 (08:58 +0100)
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>
drivers/scsi/megaraid.c

index 4d39a9ffc0813a32882e5c6469ccbdfce2eee206..97825f11695445d0c3ebed84ec6ac3dd5fc9022e 100644 (file)
@@ -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;
@@ -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;