Message ID | 20190321172417.77869-2-bvanassche@acm.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Multiple fixes for issues reported by static checkers | expand |
On Thu, Mar 21, 2019 at 10:24:10AM -0700, Bart Van Assche wrote: > This patch avoids that sparse and smatch report the following: > > warning: cast removes address space of expression > > Fixes: 3a6532c9af1a ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write") # v5.0. > Signed-off-by: Bart Van Assche <bvanassche@acm.org> > --- > drivers/infiniband/core/uverbs_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 70b7d80431a9..b8fc5a329e21 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -720,7 +720,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, * then the command request structure starts * with a '__aligned u64 response' member. */ - ret = get_user(response, (const u64 *)buf); + ret = get_user(response, (const u64 __user *)buf); if (ret) goto out_unlock;
This patch avoids that sparse and smatch report the following: warning: cast removes address space of expression Fixes: 3a6532c9af1a ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write") # v5.0. Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)