[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231013224818.3456409-8-jim.cromie@gmail.com>
Date: Fri, 13 Oct 2023 16:47:59 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: linux-kernel@...r.kernel.org, jbaron@...mai.com,
gregkh@...uxfoundation.org, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org
Cc: lb@...ihalf.com, linux@...musvillemoes.dk, joe@...ches.com,
mcgrof@...nel.org, daniel.vetter@...ll.ch, jani.nikula@...el.com,
ville.syrjala@...ux.intel.com, seanpaul@...omium.org,
robdclark@...il.com, groeck@...gle.com, yanivt@...gle.com,
bleung@...gle.com, linux-doc@...r.kernel.org,
Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH v7b 07/25] dyndbg: drop NUM_TYPE_ARRAY
ARRAY_SIZE works here, since array decl is complete.
no functional change
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 b53217e4b711..8116d0a0d33a 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -106,11 +106,9 @@ struct ddebug_class_map {
.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))
/* encapsulate linker provided built-in (or module) dyndbg data */
struct _ddebug_info {
--
2.41.0
Powered by blists - more mailing lists