projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8307c28
)
[PATCH] IB/ipath: read/write correct sizes through diag interface
author
Bryan O'Sullivan
<
[email protected]
>
Sat, 1 Jul 2006 11:36:14 +0000
(
04:36
-0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 1 Jul 2006 16:56:01 +0000
(09:56 -0700)
We must increment uaddr by size we are reading or writing, since it's passed
as a char *, not a pointer to the appropriate size.
Signed-off-by: Dave Olson <
[email protected]
>
Signed-off-by: Bryan O'Sullivan <
[email protected]
>
Cc: "Michael S. Tsirkin" <
[email protected]
>
Cc: Roland Dreier <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/infiniband/hw/ipath/ipath_diag.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/ipath/ipath_diag.c
b/drivers/infiniband/hw/ipath/ipath_diag.c
index d7f17f2a436c48c0212f75563cc24931558ef1be..8a0425e98b5f6d201c6921e7da59ff43530781d7 100644
(file)
--- a/
drivers/infiniband/hw/ipath/ipath_diag.c
+++ b/
drivers/infiniband/hw/ipath/ipath_diag.c
@@
-115,7
+115,7
@@
static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr,
goto bail;
}
reg_addr++;
- uaddr
++
;
+ uaddr
+= sizeof(u64)
;
}
ret = 0;
bail:
@@
-154,7
+154,7
@@
static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr,
writeq(data, reg_addr);
reg_addr++;
- uaddr
++
;
+ uaddr
+= sizeof(u64)
;
}
ret = 0;
bail:
@@
-192,7
+192,8
@@
static int ipath_read_umem32(struct ipath_devdata *dd, void __user *uaddr,
}
reg_addr++;
- uaddr++;
+ uaddr += sizeof(u32);
+
}
ret = 0;
bail:
@@
-231,7
+232,7
@@
static int ipath_write_umem32(struct ipath_devdata *dd, void __iomem *caddr,
writel(data, reg_addr);
reg_addr++;
- uaddr
++
;
+ uaddr
+= sizeof(u32)
;
}
ret = 0;
bail: