]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: use for_each_sgtable_dma_sg for dma sgt
authorOhad Sharabi <osharabi@habana.ai>
Thu, 24 Mar 2022 14:34:49 +0000 (16:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:18 +0000 (21:01 +0200)
commit3a99991665f8ff77cb749b8dac6baffb2a4251b8
tree40c6c06043e36b7ed25b4afff96aaff28bf8cb53
parenta1fc70297c2b386f323e04e5b235ea9874f257ae
habanalabs: use for_each_sgtable_dma_sg for dma sgt

Instead of using for_each_sg when iterating sgt that contains dma
entries, use the more proper for_each_sgtable_dma_sg macro.

In addition, both Goya and Gaudi have the exact same implementation
of the asic function that encapsulate the usage of this macro, so
it is better to move that implementation to the common code.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/debugfs.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c