Commit db6f0289 authored by Markus Elfring's avatar Markus Elfring Committed by Doug Ledford

IB/hfi1: Coding style improvement (make sizeof use safer)

Replace the specification of a data structure by a reference to
the desired member as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer according to
the Linux coding style convention.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent e036c200
...@@ -705,7 +705,9 @@ int hfi1_user_sdma_process_request(struct file *fp, struct iovec *iovec, ...@@ -705,7 +705,9 @@ int hfi1_user_sdma_process_request(struct file *fp, struct iovec *iovec,
/* Save all the IO vector structures */ /* Save all the IO vector structures */
for (i = 0; i < req->data_iovs; i++) { for (i = 0; i < req->data_iovs; i++) {
INIT_LIST_HEAD(&req->iovs[i].list); INIT_LIST_HEAD(&req->iovs[i].list);
memcpy(&req->iovs[i].iov, iovec + idx++, sizeof(struct iovec)); memcpy(&req->iovs[i].iov,
iovec + idx++,
sizeof(req->iovs[i].iov));
ret = pin_vector_pages(req, &req->iovs[i]); ret = pin_vector_pages(req, &req->iovs[i]);
if (ret) { if (ret) {
req->status = ret; req->status = ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment