[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260129072932.2190803-9-jim.cromie@gmail.com>
Date: Thu, 29 Jan 2026 00:28:54 -0700
From: Jim Cromie <jim.cromie@...il.com>
To: gregkh@...uxfoundation.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,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH v9 08/32] dyndbg: make ddebug_class_param union members same size
struct ddebug_class_param keeps a ref to the state-storage of the
param; make both class-types use the same unsigned long storage type.
ISTM this is simpler and safer; it avoids an irrelevant difference,
and if 2 users somehow get class-type mixed up (or refer to the wrong
union member), at least they will both see the same value.
Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
include/linux/dynamic_debug.h | 2 +-
lib/dynamic_debug.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index a10adac8e8f0..441305277914 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -104,7 +104,7 @@ struct _ddebug_info {
struct ddebug_class_param {
union {
unsigned long *bits;
- unsigned int *lvl;
+ unsigned long *lvl;
};
char flags[8];
const struct ddebug_class_map *map;
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 55e07b706c84..1d13e3ee3e12 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -811,7 +811,7 @@ int param_get_dyndbg_classes(char *buffer, const struct kernel_param *kp)
case DD_CLASS_TYPE_LEVEL_NAMES:
case DD_CLASS_TYPE_LEVEL_NUM:
- return scnprintf(buffer, PAGE_SIZE, "%d\n", *dcp->lvl);
+ return scnprintf(buffer, PAGE_SIZE, "%ld\n", *dcp->lvl);
default:
return -1;
}
--
2.52.0
Powered by blists - more mailing lists