mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
RDMA: Convert drivers using min to ib_respond_udata()
Convert the pattern: ib_copy_to_udata(udata, &resp, min(sizeof(resp), udata->outlen)); Using Coccinelle: @@ identifier resp; expression udata; @@ - ib_copy_to_udata(udata, &resp, min(sizeof(resp), udata->outlen)) + ib_respond_udata(udata, resp) @@ identifier resp; expression udata; @@ - ib_copy_to_udata(udata, &resp, min(udata->outlen, sizeof(resp))) + ib_respond_udata(udata, resp) Run another pass with AI to propagate the return code correctly and remove redundant prints. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
9ebad5c3eb
commit
a5e9f0ae62
13 changed files with 49 additions and 110 deletions
Loading…
Add table
Add a link
Reference in a new issue