From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8245D328B64 for ; Mon, 22 Dec 2025 08:22:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766391761; cv=none; b=A/RvEdieJWyuFrgkFEAbZVZoRjZnFb3LKfdFNGoJ/HFq0H9vDnE9uJX5fgZAnFui9WAtx+T2r1YErs7Qm33JOZktr6LrLkm5EiU4J9RAGbzmO1+gGxtv4zAGEPhSt0YnV09Qokx8QjxkNjJ2q5uxO9FHqAAzSaXqmCX6K7OZPHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766391761; c=relaxed/simple; bh=sDWD1uGFDDRlfxhy01ddUztM6UdtdQV0shZVeb+54EY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nUjjRRcxk7rRova7cZFfEJNHH5gIi96vcaQHp8fs5UVCENrKZBX0/j/gbHFnem2T/MyFDEXfitxzCUKijExKKST0ux9oubFFm8fOGrJjuX7FaHciKjnCP8ylD68KaJ2MftSL1SgeYtLLD6jXRFS+XupzD16X3txmetCXTYCJHMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=brw2J+01; arc=none smtp.client-ip=209.85.210.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="brw2J+01" Received: by mail-pf1-f196.google.com with SMTP id d2e1a72fcca58-7b9387df58cso6062156b3a.3 for ; Mon, 22 Dec 2025 00:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766391759; x=1766996559; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pKljsU8Xmw+/foisR3SYsx7mqK9N8s1wNDUiE0Eb/VY=; b=brw2J+01l29xZF3uoviOh1HX69oFxnKM38LprtWgTC/Iu6TCRc15j3RTm4crMIKEre T7dFX3gLcukm4nX1CJ/SPTX+oipCSFVXKfYuy3EbxMWmNaWHbjmQIarbAGXUizmLv6FQ /usVY3Xl4QIKwdbbAt8/SoluakobOiuM8GfdTgulaCJvOlZNd1psgt7k0mbKk0z/kUVE 0Q2Wu/l50VSLC7vc1DGPGMDu5mqWFT/3cXsUKV/SZEdBdfnt5v0XYe31e1yRrXEaZ9a5 dHKsb/PxvbZMBAJBjPHH80XM5/uhpsbWAzB7SvyEhONbT4h0WGco7QQ/pkIWaA0NOQop eAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766391759; x=1766996559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pKljsU8Xmw+/foisR3SYsx7mqK9N8s1wNDUiE0Eb/VY=; b=d147/e5MQPBdVSTLdM5rqC3RVRdDnNmsA3fhAkYnM5HX6KhpnJirI+rUtX0GVU/M4h PrLKQIuL2wDei3xfl4CidfTvBjw4xeLqWJrSpfkefcycfDO+qKFFRd9WjAggq4qbF5aK AdtHM1iV/KZ1djqDeThaa2Khwn81JFqwIb9d51dZ8GyBjwJR2ugqRgWABI6css8dZALS vkF72DNK9EJ06HI2CfSp7OoY/2W8oMCmlW4RIdI11tbqmJq8gHYEchuVNb1W45eRT3O9 3sew5ya9qZItwk03+TUiEVZjQ4ctKUXypo9PQbyzjQTF7iRJMvedMmKlFbpDHTJqk0Lx vtmQ== X-Gm-Message-State: AOJu0Yx5mpJKbqWgKoTnTHVLHCoYFE7p7DpiBWsgZGgvzVdnaOewnjSk cH9pOzU5zaY5bPl3C7o4aP0oqFVoR8TQ/v4yeEBXQ9WnBhTadJfNeoett4wVFX3p3u/rvA== X-Gm-Gg: AY/fxX7faImiTVWFyb974M0AD9xT+FFjTXKppp7EwYko3X2RLu8+8qIslCiyM0eulwZ mfcfHsuU42r8ptyZZcpeGB4HiCZvXIqihm/YFOsiuOUdLB7XfeCZv9c1OoYgXv+uZ/L1LOYcsRp Wy1OXUvczmzI8GB9KHzyGBJ/A4c40Ocs1eQwu6QZqvWZxogg2cugA1VyesqkFEGX/wVBVPVN1I2 fz52lQRFWdrSziS/gL3DDj+Yd76e8IaZRWTtvxGzhTaEgN2++6BDLHsi6Q7BIw9WfX3SP+ayugl UPi60XDu6WmX6veGqvsjTl4oV02iQQCboitFXwTWyFlFAHxJHqcS1WORVdlYTm9ArtbCb91YWdH +iT99tzyp+5If17CszcXiup9uYrO30Jae7+FflC5D6vi4cff6N6o1E6DWmmF0i1Ag0w5gsXG4oT 4otHOLNqdx X-Google-Smtp-Source: AGHT+IEbn13GAc82azOlCQBzD0kgiJPbfq4yJfKj6lNc2cko7ljpTpb+ZvesmNM1IQ0X0cprC78m6A== X-Received: by 2002:a05:6a21:3395:b0:366:2341:4980 with SMTP id adf61e73a8af0-376a81dd746mr9694106637.11.1766391759442; Mon, 22 Dec 2025 00:22:39 -0800 (PST) Received: from frodo ([2404:4400:417e:3d00:8b90:7f55:1261:772f]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-7ff7e493123sm9540699b3a.50.2025.12.22.00.22.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Dec 2025 00:22:38 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org, louis.chauvet@bootlin.com Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, quic_saipraka@quicinc.com, will@kernel.org, catalin.marinas@arm.com, quic_psodagud@quicinc.com, maz@kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, mingo@redhat.com, jim.cromie@gmail.com Subject: [PATCH v7 07/31] dyndbg: make ddebug_class_param union members same size Date: Mon, 22 Dec 2025 21:20:24 +1300 Message-ID: <20251222082049.1782440-8-jim.cromie@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251222082049.1782440-3-jim.cromie@gmail.com> References: <20251222082049.1782440-3-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jim Cromie --- 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 98a36e2f94b6..4b7c3b997657 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -103,7 +103,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 cb171088850c..d2ff203d0873 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -810,7 +810,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