[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250803035816.603405-4-jim.cromie@gmail.com>
Date: Sat, 2 Aug 2025 21:57:21 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: linux-kernel@...r.kernel.org,
jbaron@...mai.com,
gregkh@...uxfoundation.org,
ukaszb@...omium.org,
louis.chauvet@...tlin.com
Cc: dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org,
intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
daniel.vetter@...ll.ch,
tvrtko.ursulin@...ux.intel.com,
jani.nikula@...el.com,
ville.syrjala@...ux.intel.com,
seanpaul@...omium.org,
robdclark@...il.com,
groeck@...gle.com,
yanivt@...gle.com,
bleung@...gle.com,
quic_saipraka@...cinc.com,
will@...nel.org,
catalin.marinas@....com,
quic_psodagud@...cinc.com,
maz@...nel.org,
arnd@...db.de,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
mingo@...hat.com,
jim.cromie@...il.com
Subject: [PATCH v4 03/58] test-dyndbg: fixup CLASSMAP usage error
commit 6ea3bf466ac6 ("dyndbg: test DECLARE_DYNDBG_CLASSMAP, sysfs nodes")
A closer look at test_dynamic_debug.ko logging output reveals a macro
usage error:
lib/test_dynamic_debug.c:105 [test_dynamic_debug]do_cats =p "LOW msg\n" class:MID
lib/test_dynamic_debug.c:106 [test_dynamic_debug]do_cats =p "MID msg\n" class:HI
lib/test_dynamic_debug.c:107 [test_dynamic_debug]do_cats =_ "HI msg\n" class unknown, _id:13
107 says: HI is unknown, and 105,106 have a LOW/MID and MID/HI skew.
DECLARE_DYNDBG_CLASSMAP() _base arg must equal the enum's 1st value,
in this case it was _base + 1. This leaves HI class un-selectable.
NB: the macro could better validate its arguments.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
Tested-by: Louis Chauvet<louis.chauvet@...tlin.com>
---
lib/test_dynamic_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c
index 77c2a669b6afd..396144cf351be 100644
--- a/lib/test_dynamic_debug.c
+++ b/lib/test_dynamic_debug.c
@@ -75,7 +75,7 @@ DD_SYS_WRAP(disjoint_bits, p);
DD_SYS_WRAP(disjoint_bits, T);
/* symbolic input, independent bits */
-enum cat_disjoint_names { LOW = 11, MID, HI };
+enum cat_disjoint_names { LOW = 10, MID, HI };
DECLARE_DYNDBG_CLASSMAP(map_disjoint_names, DD_CLASS_TYPE_DISJOINT_NAMES, 10,
"LOW", "MID", "HI");
DD_SYS_WRAP(disjoint_names, p);
--
2.50.1
Powered by blists - more mailing lists