From: Himanshu Madhani Date: Thu, 9 Apr 2015 18:59:56 +0000 (-0400) Subject: qla2xxx: Fix crash due to wrong casting of reg for ISP27XX. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cbfb1ebbbcdc49eac2f49e146452507b05fcae5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git qla2xxx: Fix crash due to wrong casting of reg for ISP27XX. [Bart: additional sparse warning caused by this patch] [jejb: fix sparse warning] Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Cc: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index a8c0c7362e48..766afb7d1df2 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -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);