accel/habanalabs: tiny refactor of hl_map_dmabuf()
authorTomer Tayar <ttayar@habana.ai>
Mon, 14 Aug 2023 15:01:21 +0000 (18:01 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 9 Oct 2023 09:37:22 +0000 (12:37 +0300)
commitd89d329a2bb39e0e0ad37d7a40302d0fa7e8851a
treeec1df790974f4572ecd3925a572367de7e7b3f45
parent0b75cb5b240fddf181c284d415ee77ef61b418d6
accel/habanalabs: tiny refactor of hl_map_dmabuf()

alloc_sgt_from_device_pages() includes relatively many parameters, and
in a subsequent change another offset parameter is going to be added.
Using structure fields directly when calling this function, and in
hl_map_dmabuf() it is done twice, makes it a little bit difficult to
understand the meaning of the parameters.
To make it clearer, assign the required values into local variables with
explicit names, and use the variables when calling the function.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/memory.c