habanalabs: use strscpy instead of sprintf and strlcpy
authorOded Gabbay <ogabbay@kernel.org>
Sat, 3 Apr 2021 13:37:29 +0000 (16:37 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 9 Apr 2021 11:09:24 +0000 (14:09 +0300)
commitae382c22fc06058b24bb49c92f3b0af653499589
treeadcd13634432627e0ad8f7bed83c0b991ee84e01
parent131d1ba1304a9a2040648cb03309d9444e7fe45f
habanalabs: use strscpy instead of sprintf and strlcpy

Prefer the use of strscpy when copying the ASIC name into a char array,
to prevent accidentally exceeding the array's length.
In addition, strlcpy is frowned upon so replace it.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c