Re: [PATCH v6 10/24] dyndbg: drop NUM_TYPE_ARGS
From: sashiko-bot@kernel.org
Date: 2026-07-08 02:24:28
Also in:
dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The newly defined macro __DDEBUG_ARRAY_SIZE is unused because the array size calculation is manually open-coded. --
--- Patch [10]: [PATCH v6 10/24] dyndbg: drop NUM_TYPE_ARGS ---commit 0ca0f4a344ab62c4d4df9c27a60daf65fecad136 Author: Jim Cromie [off-list ref] dyndbg: drop NUM_TYPE_ARGS This commit removes the NUM_TYPE_ARGS macro and replaces it with an array size calculation. The commit message mentions adding a new local macro named __DDEBUG_ARRAY_SIZE to handle this without causing include conflicts.
quoted hunk ↗ jump to hunk
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 9607121c3072e..9ae1accb9bf63 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h@@ -8,6 +8,8 @@ #include <linux/build_bug.h> +#define __DDEBUG_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +
[ ... ]
quoted hunk ↗ jump to hunk
@@ -122,11 +124,9 @@ struct ddebug_class_param { .mod_name = KBUILD_MODNAME, \ .base = _base, \ .map_type = _maptype, \ - .length = NUM_TYPE_ARGS(char*, __VA_ARGS__), \ + .length = (sizeof(_var##_classnames) / sizeof(_var##_classnames[0])), \
[Severity: Low] This isn't a bug, but should this line use the new __DDEBUG_ARRAY_SIZE macro introduced above? The calculation appears to be manually open-coded here, leaving the newly defined macro unused.
.class_names = _var##_classnames, \ }
-- Sashiko AI review · https://sashiko.dev/#/patchset/20260707-dd-maint-2-v6-0-381f3edb0045@gmail.com?part=10