* [PATCH RFC] qla2xxx: Fix qla27xx_write_reg()
@ 2015-01-14 16:10 Bart Van Assche
0 siblings, 0 replies; only message in thread
From: Bart Van Assche @ 2015-01-14 16:10 UTC (permalink / raw)
To: Quinn Tran, Saurav Kashyap; +Cc: linux-scsi@vger.kernel.org
The second argument passed to qla27xx_write_reg() is a byte offset.
This means that this function must read data from (void *)reg + offset
instead of (void *)reg + sizeof(*reg) * offset. Found this via source
reading. Untested.
---
drivers/scsi/qla2xxx/qla_tmpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
index a8c0c73..7a92f60 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);
--
2.1.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-14 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 16:10 [PATCH RFC] qla2xxx: Fix qla27xx_write_reg() Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).