diff mbox series

[2/2] dm vdo: Increase MAX_VDO_WORK_QUEUE_NAME_LEN size

Message ID 20241112161019.4154616-3-john.g.garry@oracle.com (mailing list archive)
State Handled Elsewhere
Headers show
Series md W=1 build fixes | expand

Checks

Context Check Description
mdraidci/vmtest-md-6_13-PR success PR summary
mdraidci/vmtest-md-6_13-VM_Test-0 success Logs for per-patch-testing

Commit Message

John Garry Nov. 12, 2024, 4:10 p.m. UTC
For compiling with W=1 and allmodconfig, the following warning can be seen:

drivers/md/dm-vdo/vdo.c: In function ‘vdo_make’:
drivers/md/dm-vdo/vdo.c:562:19: error: ‘%s’ directive output may be truncated writing up to 55 bytes into a region of size 16 [-Werror=format-truncation=]
  562 |                  "%s%u", MODULE_NAME, instance);
      |                   ^~
drivers/md/dm-vdo/vdo.c:561:9: note: ‘snprintf’ output between 2 and 66 bytes into a destination of size 16
  561 |         snprintf(vdo->thread_name_prefix, sizeof(vdo->thread_name_prefix),
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  562 |                  "%s%u", MODULE_NAME, instance);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Increase MAX_VDO_WORK_QUEUE_NAME_LEN in size to deal with this.

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 drivers/md/dm-vdo/funnel-workqueue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/md/dm-vdo/funnel-workqueue.h b/drivers/md/dm-vdo/funnel-workqueue.h
index b5be6e9e83bc..6307fe811ca0 100644
--- a/drivers/md/dm-vdo/funnel-workqueue.h
+++ b/drivers/md/dm-vdo/funnel-workqueue.h
@@ -11,7 +11,7 @@ 
 #include "types.h"
 
 enum {
-	MAX_VDO_WORK_QUEUE_NAME_LEN = TASK_COMM_LEN,
+	MAX_VDO_WORK_QUEUE_NAME_LEN = TASK_COMM_LEN + 41,
 };
 
 struct vdo_work_queue_type {