[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260114015815.1565725-9-jim.cromie@gmail.com>
Date: Tue, 13 Jan 2026 18:57:24 -0700
From: Jim Cromie <jim.cromie@...il.com>
To: gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Cc: Jim Cromie <jim.cromie@...il.com>,
Jason Baron <jbaron@...mai.com>,
Ćukasz Bartosik <ukaszb@...omium.org>,
Louis Chauvet <louis.chauvet@...tlin.com>,
Bagas Sanjaya <bagasdotme@...il.com>,
Dave Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
dri-devel@...ts.freedesktop.org,
Petr Mladek <pmladek@...e.com>,
Shuah Khan <skhan@...uxfoundation.org>,
linux-doc@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>
Subject: [PATCH v8 08/31] dyndbg: drop NUM_TYPE_ARRAY
ARRAY_SIZE works here, since array decl is complete.
no functional change
Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
include/linux/dynamic_debug.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 4b7c3b997657..c4ae79f934d9 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -131,11 +131,9 @@ struct ddebug_class_param {
.mod_name = KBUILD_MODNAME, \
.base = _base, \
.map_type = _maptype, \
- .length = NUM_TYPE_ARGS(char*, __VA_ARGS__), \
+ .length = ARRAY_SIZE(_var##_classnames), \
.class_names = _var##_classnames, \
}
-#define NUM_TYPE_ARGS(eltype, ...) \
- (sizeof((eltype[]) {__VA_ARGS__}) / sizeof(eltype))
extern __printf(2, 3)
void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
--
2.52.0
Powered by blists - more mailing lists