Message ID | 20230713163626.31338-4-jim.cromie@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1964949vqm; Thu, 13 Jul 2023 10:08:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWWBURe2E/55FH/Qx/90NJNYpdbjEtMNMbuatEwMKyUt9ccKvNsI07dw5sRd7xwEe3mSmn X-Received: by 2002:a17:906:779c:b0:994:1ef9:91dc with SMTP id s28-20020a170906779c00b009941ef991dcmr2367491ejm.15.1689268110814; Thu, 13 Jul 2023 10:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689268110; cv=none; d=google.com; s=arc-20160816; b=g35Da6vTiz0lIfiq1bMELP4gXLi3jiNGMAllKpwmRTtVgFoY9zk1xz77xlC2x1C8IX 9+BCrIcRwFSgGaQPRpDhkTppA+SpAF+IxlQjLoGgPsySk0ooP+2maCRNqmtnXQkd5yPM OJ2erO/fwKCAfVirf3RxX+mCONfDbhyAjb2uIZAMkXKexvNPWgIdJuWriIiw6mwBjCAk TxxzW7HyUlrpa+K87Qb6rJXBt6wFUAFeck02npRT+Rcv5O9RuWWelkhd6bwNolCk0x8E iTf9N25fAfoCiqTXg5DRcOuek7Sm6usWyoHKxP8/FU5Lf/DFPAtdbnM0rftUYoKbs6Li rIEA== 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=/Vt/wHfetwQDHpRz65Llg9LjGES1lnjN8dFqGOHt2Ac=; fh=/CYHsJHkAPOgOy4IDXYU5w+VojxE3561vOD18ijZg9Q=; b=ubhFv9LRWmOzHnxFRwnmq2wwbB2rXFbciOuv7WbO1Vx6NZsA4FOiwq45P1vBBpHB+u 2N3JO+rp8ccNxhjPPmuPTI0Bl3T32bWP95b4gJ+U+5hpyH5Cj8Mu6GxR+6Opuk2mjsZN ElfsR4jRp9p05RrWCJJ2oNZMl2jQTGZzS+0yQhJO5s3t7Pq3FBtpnlGTGanIqral2LL/ n4AwJM76M0X30F+JdO3J8YelqRRzh2a7NVqCdMWtcjBRW+hziWv5nPAXkE1P6TshrkX3 qWkG62e+oVis8xzL4dApCy4a3KwRgqZ9DmWIipuj6iH2/u3b2AtFdHdH0gy3FAm3cOKu zZ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=glp7P9Gj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t20-20020a1709064f1400b00992f45c9341si7421326eju.1016.2023.07.13.10.07.53; Thu, 13 Jul 2023 10:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=glp7P9Gj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235070AbjGMQh2 (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 12:37:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232628AbjGMQhM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 12:37:12 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5E77359F for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 09:36:49 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3466725f0beso3960465ab.1 for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 09:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689266209; x=1691858209; 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=/Vt/wHfetwQDHpRz65Llg9LjGES1lnjN8dFqGOHt2Ac=; b=glp7P9GjRU67Gp1MffApNvQw8LEldcVlfVMrc0FYDz/Ji+gCup2prH6rGPmMYwhPQ9 8WmCpif59LAubxHCev8KU04P+nmlye8BjKr5dbHWKECz/C7PeUWtC//KYGEmzQEb9J5i xtD9nlmLiOIczFi9lyOuv8b31P3RMMKazReNtv96JbPeII5OObkeKXmXw7exZaQEfvuj v1/Z6fDnEonb5+7mgIbJVB0k+Vd1tUMKG8fUGg554pzJ+CL03akaAEDnrz7cYQgr7eTo bW3HJnaRoF5cyZgslcOlYe9DCDbIXQRz04Y4iJ+UPR1IJE/cvcDIMLis/yPM3ve1fcQA LLNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689266209; x=1691858209; 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=/Vt/wHfetwQDHpRz65Llg9LjGES1lnjN8dFqGOHt2Ac=; b=OvmDmXBcqmuqSTX6xY4VwJ6jHn+cCNosr0E+NNCzIMgnqGIHupV0sjD2WDtDvwI/kD cUJV3ejlju/1HReR8Yf9JRDR4HjiKmPd8SVoQNcvR//G2rqycIQQ1qUbKP7pJXhTqxYG +gHYYHfMYNudAYALs4VDx6xMY2aPQ6GiTYo3+O5tdeELK1moQSS3LfDQ3ufhhNwdtjHf VmvuDt+wF1BPUt04PCYAuULeljGi8DAILgAHECFVX/8o16VINE1Imwne4J7QQh28M09K a/6eHFtmJlPc68Wk24rjDZ2PMx0QIPMf18rLizAnFJnixPJxQBTMQ6s5J1XyxrJsXBYt Uutg== X-Gm-Message-State: ABy/qLaHdMBsDCvc2bCKM+VTglZK5yiOK1QnrCUrghExz5TuE71Sw0ZI b2R1dDzbRCC6wEi//97H53M= X-Received: by 2002:a92:c6c1:0:b0:346:5aeb:44ec with SMTP id v1-20020a92c6c1000000b003465aeb44ecmr2256251ilm.22.1689266208806; Thu, 13 Jul 2023 09:36:48 -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 s7-20020a92d907000000b00345950d7e94sm2147571iln.20.2023.07.13.09.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 09:36:48 -0700 (PDT) From: Jim Cromie <jim.cromie@gmail.com> To: jbaron@akamai.com, daniel.vetter@ffwll.ch, 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 Cc: jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, gregkh@linuxfoundation.org, Jim Cromie <jim.cromie@gmail.com> Subject: [PATCH v4 03/21] dyndbg: make ddebug_class_param union members same size Date: Thu, 13 Jul 2023 10:36:08 -0600 Message-ID: <20230713163626.31338-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230713163626.31338-1-jim.cromie@gmail.com> References: <20230713163626.31338-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_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771325998386879713 X-GMAIL-MSGID: 1771325998386879713 |
Series |
fix DRM_USE_DYNAMIC_DEBUG regression
|
|
Commit Message
Jim Cromie
July 13, 2023, 4:36 p.m. UTC
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 <jim.cromie@gmail.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 061dd84d09f3..dc41e70dc2e1 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -122,7 +122,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 fdd6d9800a70..22a3182bf89f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -795,7 +795,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; }