Commit 309243ec14fde1149e1c66f19746e239e86caf39
Committed by
Roland Dreier
1 parent
374b105797
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
IB/core: const'ify inbuf in struct ib_udata
Userspace input buffer is not modified by kernel, so it can be 'const'. This is also a prerequisite to remove the implicit cast from INIT_UDATA(). Link: http://marc.info/?i=cover.1386798254.git.ydroneaud@opteya.com> Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff
drivers/infiniband/core/uverbs.h
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | |
50 | 50 | #define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \ |
51 | 51 | do { \ |
52 | - (udata)->inbuf = (void __user *) (ibuf); \ | |
52 | + (udata)->inbuf = (const void __user *) (ibuf); \ | |
53 | 53 | (udata)->outbuf = (void __user *) (obuf); \ |
54 | 54 | (udata)->inlen = (ilen); \ |
55 | 55 | (udata)->outlen = (olen); \ |