Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2388987rdb; Mon, 11 Sep 2023 23:26:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+tb5R8HODf8Utz/NOoFr18Tu7ZQPbG6/I0tUwP1oGNNcZ1Au8viSELdqK7Oi+H99qQZlR X-Received: by 2002:a17:90a:680f:b0:268:38a7:842e with SMTP id p15-20020a17090a680f00b0026838a7842emr10702889pjj.2.1694500005826; Mon, 11 Sep 2023 23:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694500005; cv=none; d=google.com; s=arc-20160816; b=JR0gFeYXY4sKL+TTnedIjM0rqf/g0RbQdV4Qvb2wZCqsQzXMeiTcXWki6WFwifelFA 1XjZLaQdWZMopWr5IWijY8To6NbDXXeBvCXsn/SRq9zqTbjTAscRKTrd/JLwnkDPLq1U Wk5znUpRTkqi8Vtpu1NcZGpZ0L5peNlQ3aI0Gr7Dmhu4tJRmlIm/vZXJdl1EzfbvXaSQ sVrsFWhjfh8CjBmmXt/KuCdFjQm6DqxUhhDGowP4pmgE5+lgNss37rP5Gvc9FS+45IPT y4UuquFWUyNwv19xQ7vjDhX72jGIz7NSZF02sw0NQ6w7U6sKQ7Bku44WM+aHQHZnlpWf UzEw== 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=Mmy4CQw8YdfUBsoDy2sZHYo8FTokxGCRVZcEnly2Jnk=; fh=lxaKKEVRHc4DKNzSwZQ1vuzFBPp/LFY0Le4b1Q6OMeE=; b=trobeFkonmuXrLWXjeSeRfEeIgc58YCVyY0/nsEdRWgQn2Jk50hNZpeFFrUUv26DEq JkyA4UY3S2WQDY0GovmBscvhcjI+gWwo6tbEx2b3LCPD0SviO7lG0fHsG2lBsmfc/BmI h4RZxsBDpJQoDt6+2Xl/fzlz6Z4nIfV5DnFmWzvaFdLXgr1wJNrfdZnL52/qH7X1UZQa hEhAWQ7gdXJAk9/dPFdYAIf8gCaWHNRULO2B6y/mOzniGe0sXd0zz8IFwgNyoOmzIpjZ Ck3ngDtjQx6xdDccizazaN5wtbhc18r/SAHCXK7Xwxsz/t3XJVJl2/joL7h1ezzpjSuH U8nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lwre9pJU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e1-20020a17090a728100b002691e035572si9335405pjg.17.2023.09.11.23.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 23:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lwre9pJU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 4F2EF8275E55; Mon, 11 Sep 2023 21:20:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235868AbjILCqs (ORCPT + 99 others); Mon, 11 Sep 2023 22:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232972AbjILCqi (ORCPT ); Mon, 11 Sep 2023 22:46:38 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4E5810DBE9; Mon, 11 Sep 2023 16:27:48 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-57756115f08so1535725a12.3; Mon, 11 Sep 2023 16:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694474777; x=1695079577; 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=Mmy4CQw8YdfUBsoDy2sZHYo8FTokxGCRVZcEnly2Jnk=; b=lwre9pJUZcQTXRB60c0sEd2Vb0tYVOdpzPfRdUqw0I+GX0dA3rvrYXzSZBHvpiPZCA UiT4ewBCOrfd06QG0wEsrptT9XE3kPSCFfXolJYe/gIRxGucNHpFOXQMiLpB2Mj/GcT5 aAV1QvK20neqZrPrwlCmvMxIUZMXqetvcDB3DyF9m4fEEeoAxN/nkVOpk8Lf8Sa6faN+ YJ1En3kUjGuJYYLqeObDEuR7+6MoR19rF3ZToV/cNsLO5IjcJFm5n5TuACOBpw6fZgqQ 6VsJsgFovikYrUyiHPNqBlYFNbgrIz1IPtHD+ADGmiR0q+xhROKQn0Bk0RoG4bMLKWR9 1uDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694474777; x=1695079577; 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=Mmy4CQw8YdfUBsoDy2sZHYo8FTokxGCRVZcEnly2Jnk=; b=Y1HQgNMbpSahLiDINmhEaPjd9SUOw2rA27GV3+0Cm0NIU6hDCU2OZqzGkByr9PiRqc VigpcI2tBSfDu2i3WH/iuab6NQHFFJDGCkKuNSL2eJy6NEr+Un8/TJvDOtqo9Nvap7w3 /re8G+UipZEKCKZxTresyj0hVuNwBUWmhray65tCq+EAeqoNBZkwHyUyzocGwbMzJyXS 1HxkBb3+Yr1KZ8ttiD4eLNXH0xDtskOC+bAhsp9a9coRJhQzfxqwaYcjjcaYGTrp+gpG YUPZs0y5FGUSc5wyTAbTsrwT844ujQB5mNqRk1JlJV3UOgNaYAomF7mScY6m4i0s3xtC Mqcw== X-Gm-Message-State: AOJu0YwdkeLUAv+bPIskUNjTDoOjL8CBRTdbPNvwl9MlUIkUyqiBR5Cs 5m4hNGrv1cKNLmKachwVaKt/Aj7Er4ZhuQ== X-Received: by 2002:a05:6602:197:b0:791:1b1c:b758 with SMTP id m23-20020a056602019700b007911b1cb758mr13933894ioo.19.1694473725817; Mon, 11 Sep 2023 16:08:45 -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 z4-20020a029f04000000b00423240c7296sm2512607jal.69.2023.09.11.16.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 16:08:45 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, mcgrof@kernel.org, daniel.vetter@ffwll.ch Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v6 02/22] dyndbg: make ddebug_class_param union members same size Date: Mon, 11 Sep 2023 17:08:18 -0600 Message-ID: <20230911230838.14461-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230911230838.14461-1-jim.cromie@gmail.com> References: <20230911230838.14461-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 11 Sep 2023 21:20:14 -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 fea732db7323..6fee76fcddd1 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