From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) (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 A871537AA6A for ; Thu, 29 Jan 2026 07:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769671823; cv=none; b=WKO0CsDFI/oTrDe1hZWMEQuV9q7xc2bNnMNrDiLHmKXpXK8l+U/DQzXn2K0HYQFwoZPokEWVv5gNbYpRjm7ehqyXEs9+il8UrTEgul7kceR2TpYquTJ4yyIwhN1vLOK7ve2FQ2eNWrsH+NUDDXqjO6gh6flgztD8ndxF8YU4EMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769671823; c=relaxed/simple; bh=awXqyY30KZp9uCYjoergwYxo1W9o2w+ZqIhz8GNp/Mg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C+K2FBmAtYyzL0okpcl0Ou8FZFR5CSZ4XV/dLDGh9vfvjC9eji5qO/x2h6mG/3V0YgyKNrsd2Ar5SpXP6GPIoR7cyqjnXQjK8+Qa0ZF44CuiivKKrb/aqlB2dbQJHPlIbfLgdcehJVLhhlyUSnjtVR9THIrRVhWMoGZc8U4Rt40= 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=R5mpU2x+; arc=none smtp.client-ip=209.85.167.193 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="R5mpU2x+" Received: by mail-oi1-f193.google.com with SMTP id 5614622812f47-45c89d754dfso249080b6e.1 for ; Wed, 28 Jan 2026 23:30:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769671820; x=1770276620; 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=go+flHjCFj5QaaQiPaxub6cNyzDZojFZJyQzORscVMw=; b=R5mpU2x+nlX54uF9S4NxFdR6TCWwXWNLVlHE+nXaccPdSj5pkOB5hZ+8iQ7UVy1zwb lKmrgOeJpwMPKCR0iUmuQH77NPVXbDrJS/9IsThwz56xXp0XisgsT+mg+ww+yUK8kwi+ uJpWUKt+WYVasrbI4cvHvmoVYPzR3m2wX38BYZzJJzfpxGmENSus7NIX4NwHk2gbkOik 8zv3RNg5qqydEzZWYfT/0iDsF6Kyb7NFou/H2HRx6I50MzSzD6GWIrzRGB30XlfmMmXr Tk/fUWPw2oSkVZ26P3hVc21nkVcnjz8eVOiR6QTs00POvBmnjaxQl0xjqIUoWV4xBsy+ Q8mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769671820; x=1770276620; 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=go+flHjCFj5QaaQiPaxub6cNyzDZojFZJyQzORscVMw=; b=mG1Z3/KGUuBBt3V2Qf14EYTJZXjAZsqAsrT/6wboxOLbvL05M+xVPr5xXsBUy4EKYR ymztrxxHg6V27GFYelcLVBgCJEuqMJgHHyh4Q9wfiaceh1OXieHNQ6MqBn5pugS65Q8t oKg1+JdldbeYsI1sp03QxwMf7EGdPwW+ymCVG5qT75RyOcAt3/UHh9BGVCdE4ZyDC9Wy RZQ8I3pOmiCB/h9iSlMOapiLcdbQgwA7d+LFT0bqusGVz39geZvX6tTMdqhYCcn5uJ6y TJ/AORksVjeJCvo46Wpksqq961mcqQcvEMrLNoB7YBEuy40c+gpfnqhGKngRRfcW87TN zNog== X-Forwarded-Encrypted: i=1; AJvYcCVdneM3nEhv/Y2O3cMWrgF933jSt1y56JGAIuRsrYwWpCgFdzqDadNfhV0xED6UQh1Xn8EGSF8RImkMfP4=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4Oxi3rwueg8959cZacfAvfeWTyaWl+tIYvDhH+SuN6hUDP/dl 2pa8HSHa/+cKOHYn+QmE/2E8Iu9gDmpfZ53a5xDTFGrZPjihvrnol/ff X-Gm-Gg: AZuq6aIj1Wp5iFwLoiEkaeHmPqoQM2TWjSoLGlyzTK160Wu/qnIx4yIsVT4ZxlLtKEU O5TtX+wE8dNDCQbPkWHCs1acRFBcido4cgqanNkAwcH17KJr9d0WvGoH2X9zyMDPmiqz6PreZDc vxpA0ZshWSYQJRXYZ31rfkSE47mKz9au7KfuUYtN8vDD/eJLXiFN94kyxUorJSChhYm7gd8yxOS iRRXb+WGOkRT52hF+MLHEOSyQdZPaYav6jcwvPs0bhxf2wYGRw9HnEbLBQEZXCTWrcFzEyNqSM5 UyFn5/LsXeZI6/VaMU4pgb9grtgrqsvvJ5IRmXZas/YngfBVR9Lt0Zh1KR28karL03IKCKCXFtc Rwp/kqjXOy0YWc+0tXMtOjCdAX/aGre6AK28P+1zatzZVdDZsYGrWZgxiJGQlbmSB6dTk095wGg JfGRtLsshT0f3Vffy+UvvTWKm2MaXELfqv0HqoPjSv X-Received: by 2002:a05:6808:1a08:b0:45e:6697:b7cd with SMTP id 5614622812f47-45efc5d1a5amr4649291b6e.20.1769671820601; Wed, 28 Jan 2026 23:30:20 -0800 (PST) Received: from godzilla (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 5614622812f47-45f08f73625sm2638135b6e.18.2026.01.28.23.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 23:30:20 -0800 (PST) From: Jim Cromie To: gregkh@linuxfoundation.org Cc: Jim Cromie , Jason Baron , =?UTF-8?q?=C5=81ukasz=20Bartosik?= , Louis Chauvet , Bagas Sanjaya , Dave Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, Petr Mladek , Shuah Khan , linux-doc@vger.kernel.org, Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH v9 08/32] dyndbg: make ddebug_class_param union members same size Date: Thu, 29 Jan 2026 00:28:54 -0700 Message-ID: <20260129072932.2190803-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260129072932.2190803-1-jim.cromie@gmail.com> References: <20260129072932.2190803-1-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 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