accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings
authorKoby Elbaz <kelbaz@habana.ai>
Mon, 11 Dec 2023 08:03:29 +0000 (10:03 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 26 Feb 2024 07:30:40 +0000 (09:30 +0200)
Fix a warning of a buffer overflow:
‘snprintf’ output between 38 and 47 bytes into a destination of size 32

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/habanalabs.h

index b1a7b229e16160b04a940d36cf781c8853a65bbe..253873315888e18007df5c97831b2fbcfc6c3232 100644 (file)
@@ -2547,7 +2547,7 @@ struct hl_state_dump_specs {
  * DEVICES
  */
 
-#define HL_STR_MAX     32
+#define HL_STR_MAX     64
 
 #define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)