Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3943769rdg; Wed, 18 Oct 2023 10:08:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXQYhwf980ksgEnj6LchaYc0bsG3M54sqZN3ki0D2hKJ9OTZBGx5I/Nb5ZoAktI7G5GIR1 X-Received: by 2002:a05:6a20:e11f:b0:15c:b7ba:1671 with SMTP id kr31-20020a056a20e11f00b0015cb7ba1671mr9090594pzb.2.1697648915017; Wed, 18 Oct 2023 10:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697648915; cv=none; d=google.com; s=arc-20160816; b=uADY4hb7uoD4P++vnI8rM+2xGMZJa4k9XAur+9XGhvRUoFUwXj7epuvXZsTqnPbHMO GETXAyjQxpZic93sz7QIItIEO4oFTp9zDYvoeDxUY6Oe9tTPOZZVLUpFH0L6hPUYS4zU z3GdMBlbOLOyPNlcz4LJ2f8bFx8AWW5vZcOoEEIcnBIaMN06uuWAWJu4FAR0OKgt/lO8 AMRTjH+M5YQDR20kcQ7Cz3wbU8wzmXsQX0hYqIgTlbpcQ47yr84EuFaT13wSNVTUBgu3 f+Uj6WFRCJ/Zliv/8zPqKwcM0HoPdn+6UN1SQUqqHKdHoafmNiDppNYElfXbu7A0E443 NUmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1C+2NMg1JH09l8lpRwB0Ubzh+mfktnl5vVkwETAlRt8=; fh=dD4hpA3+YqlszWEwFTO+ADczjyhU7P27niWnWgZXhCU=; b=JT2CsaWQknu2W2+saT2+cLcT7LVQTjLYlQAw98BwXWmBtPvTAJkT/IRucq3BwFNKen An9ZJ6QobdQg9p9t0V7aw5qj7V5Y7h6A59/wo8pvtXYPp4NpMy8eyBJUFwuB7+QcKxHR V+gvG7m/AbnRwxJSEzf8xKMbiRYAk8X0urOIYZbpI1F/sj52yfsq2IhqRJeiY0oeY+31 0i6CVR97/pgXwINm6myDdpkzf6gBg3lrJ4Lgb8lA5pCKJW3HlNVnXaDnK/ZqXHOl2JoI qrMe/UNIDEasz0DqZphwtHFD7h1W45tFQlAmHlNtR/TNetpqeiDU8lESEZaEUFSojsNq k4fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="IgdE6n+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id k124-20020a636f82000000b0057e0c5a34f1si2430850pgc.239.2023.10.18.10.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="IgdE6n+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 09A22809DE76; Wed, 18 Oct 2023 10:06:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231518AbjJRRGX (ORCPT + 99 others); Wed, 18 Oct 2023 13:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbjJRRGP (ORCPT ); Wed, 18 Oct 2023 13:06:15 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD29113; Wed, 18 Oct 2023 10:06:14 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-79fd60f40ebso175705639f.1; Wed, 18 Oct 2023 10:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697648773; x=1698253573; 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=1C+2NMg1JH09l8lpRwB0Ubzh+mfktnl5vVkwETAlRt8=; b=IgdE6n+/3UVBCYY69nNGAeV+47UVRuVW8VDB3DzVcceYRePwyvQayI6i9dLm4RSps+ 3jSeVsRqv+U3YXjMEqECoEvyZZzCcLZPAJfmrUwoebExXtyEw5ilL8hU3eeZCR7dgkpc f9i3R6f348y1z9kqneuY46X66NfgbXvvZnbKOXFesAvMH2HZdl53sFfbDMF1XHYqRwSX 8z4HG3dkSY3mkaHQL2r9twsKFlU+TAIBKtS4jMAlK3gA9tFj9pOqcGggjuYPw6Ox4vG0 jVdNFFh0JZ/rRmtC+JAuw0IxBBVbIUc5fvAme/it+mxFC6icGI0U2PHOtoD1fWZR9MIT UBhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697648773; x=1698253573; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1C+2NMg1JH09l8lpRwB0Ubzh+mfktnl5vVkwETAlRt8=; b=UYV2IJkbkXkwMOjDQFKDfCXJ0mIZnD3Ll+vIV0Q+u/4SwN/wtJTIscU+AxmXdQh/RF sZ6ucb+YrLjpVj3K5120nUuRAo99mNfvYeRX4Ba3nuh/oV/MChZ82xgLk75jcuBlziC/ J9YpMmtRMFpRLcVjX1RLnjf39Z9juxKfwr7m73QGn7WfnNdDQQUTOXXALQQ1ILHyADe9 oyDq+sbQ3QmY/I+tfwjewhX0FtANImNDPCYY+nA3PbVFHQAJ7lRG3nwyajXVVM70+Jah cH40MK5U1hu3EjNGe+Z9GgtnSyDfw8WPs2USdMxCjGNniJVAK4P3VZxdmOKWzne5BtEX HcKw== X-Gm-Message-State: AOJu0YyyycPbX5gFt7tO3XBZNr2xAefxZp5+yRGTV4CtnOHfXk8wMZDd BEbv5XaYYgZYjxVL7Zxg+JS1sf8NfFBgwg== X-Received: by 2002:a5d:9da6:0:b0:787:8cf:fe82 with SMTP id ay38-20020a5d9da6000000b0078708cffe82mr5775684iob.8.1697648773211; Wed, 18 Oct 2023 10:06:13 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id n4-20020a5d8244000000b0079fa1a7cd36sm1228944ioo.30.2023.10.18.10.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:06:12 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: lb@semihalf.com, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, rostedt@goodmis.org, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v7c 03/24] dyndbg: make ddebug_class_param union members same size Date: Wed, 18 Oct 2023 11:05:43 -0600 Message-ID: <20231018170604.569042-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018170604.569042-1-jim.cromie@gmail.com> References: <20231018170604.569042-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 10:06:39 -0700 (PDT) struct ddebug_class_param keeps a ref to the state-storage of the param, make both flavors use the same unsigned long under-type. ISTM this is simpler and safer. 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 4fcbf4d4fd0a..5231aaf361c4 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -124,7 +124,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 ceb3067a5c83..b984ce338921 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -796,7 +796,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.41.0