Skip to content

Conversation

@lorelei-sakai
Copy link
Member

This merges changes from PR vdo-devel/226 , which is responsive to upstream discussion.

Also remove MODULE_NAME, which is now unused.

This fixes a warning about string truncation in snprintf that
will never happen in practice:

drivers/md/dm-vdo/vdo.c: In function ‘vdo_make’:
drivers/md/dm-vdo/vdo.c:564:5: error: ‘%s’ directive output may be truncated writing up to 55 bytes into a region of size 16 [-Werror=format-truncation=]
    "%s%u", MODULE_NAME, instance);
     ^~
drivers/md/dm-vdo/vdo.c:563:2: note: ‘snprintf’ output between 2 and 66 bytes into a destination of size 16
  snprintf(vdo->thread_name_prefix, sizeof(vdo->thread_name_prefix),
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    "%s%u", MODULE_NAME, instance);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Suggested-by: John Garry <[email protected]>
Signed-off-by: Matthew Sakai <[email protected]>
@lorelei-sakai lorelei-sakai merged commit dacb02d into dm-vdo:main Jan 15, 2025
2 checks passed
@lorelei-sakai lorelei-sakai deleted the fix/remove-thread-name-format-warning branch January 15, 2025 22:59
lorelei-sakai added a commit that referenced this pull request Mar 14, 2025
…at-warning

dm vdo: use a short static string for thread name prefix
lorelei-sakai added a commit that referenced this pull request May 5, 2025
…at-warning

dm vdo: use a short static string for thread name prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants