qla2xxx: Fix crash due to wrong casting of reg for ISP27XX.
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Thu, 9 Apr 2015 18:59:56 +0000 (14:59 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 10 Apr 2015 15:40:25 +0000 (08:40 -0700)
[Bart: additional sparse warning caused by this patch]
[jejb: fix sparse warning]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/qla2xxx/qla_tmpl.c

index a8c0c73..766afb7 100644 (file)
@@ -190,7 +190,7 @@ static inline void
 qla27xx_write_reg(__iomem struct device_reg_24xx *reg,
        uint offset, uint32_t data, void *buf)
 {
-       __iomem void *window = reg + offset;
+       __iomem void *window = (void __iomem *)reg + offset;
 
        if (buf) {
                WRT_REG_DWORD(window, data);