Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1256835rdg; Fri, 13 Oct 2023 15:49:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEahMh58ksinxgXPszP7NhrA6lTLtcpdVFnafOFgB5qSGPScqcacR8eUJQ329bm4uY54NUf X-Received: by 2002:a17:90a:d911:b0:27d:3f93:c148 with SMTP id c17-20020a17090ad91100b0027d3f93c148mr2779399pjv.13.1697237348355; Fri, 13 Oct 2023 15:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697237348; cv=none; d=google.com; s=arc-20160816; b=wLjUfs76WQj8gcBCTfAnmCjJ08Oy+TJnoe2ENfBOPayVIFKlY/jF+Hdvw6wtc1/njr VhH8QqJuBPEhd3Q2XeS0e7YZpyyXxH7sUVVxtgTpT8VmjbN8jMeVlIW28sClvr4jSi8S lB+z7Frh1jD/sV7e1exf4et0nVx85qX4Fim5tWnm1zVt7gB9O+KHYA94pIfVBJqIMdff cjfH6T16fTVujBjbH7Z3MHaorYBxlCJ3YeCPITmiIAvHjRrEOzuF1HLYi//bbgN0Xj7W d4TwBB1oKQ0E6Ztk7hxB5dXjz7LNXZbrtLd/hq7uwDjrvDOeFLdF8poW9NzbZI9Z4DCl kekg== 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=fEjUcd2gIGh+rcuXSmEeq7H3LSdL8L2dg7mL1DHpCLA=; fh=z8A2UgI9Ozi/zM+meU3S7fSTeKB52ixSkA1q1cGr6xs=; b=Rax54Rb+PQCARAQKlEIhqHKgJMdtA9oJGVkL/Y5oi/KsFwWWuMK95qAo/NGfK48JTG yidEWlPIAbcCT62HO2J/xC8DpEFPo19cJ5b8G/IH9VT4oKa+qvWA5Ov4r5DfCw4IbTbL +2J6GhAtvHe0GgLHZoGYJI1LNNh0wc2J/p6pGXJP8pidO7I1pnBbwGMp9GXYtfmp4b0d NK0XVraQPbCKH24KQ2aAuhE8gkjp2qpF4pV3akqYDBB942DPk/Sj6j1zRNNk+bjK5JUJ KhErF42xDVfo8tW9OGfGIPZw/WB1R4vEwN0hDTCMvzZDAGPeREXIYxmo1MaOl0GgpE90 2MTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Szk1MqHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id r88-20020a17090a43e100b0027927d7c0ebsi1028353pjg.45.2023.10.13.15.49.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Szk1MqHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 81668834A9EF; Fri, 13 Oct 2023 15:49:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjJMWsw (ORCPT + 99 others); Fri, 13 Oct 2023 18:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232374AbjJMWsk (ORCPT ); Fri, 13 Oct 2023 18:48:40 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5FEB7; Fri, 13 Oct 2023 15:48:38 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-352a22e1471so10472845ab.0; Fri, 13 Oct 2023 15:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697237318; x=1697842118; 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=fEjUcd2gIGh+rcuXSmEeq7H3LSdL8L2dg7mL1DHpCLA=; b=Szk1MqHwB6IvfWGECTmStfmQp20yByi8liZ4kZPrBBYtdB0vOhbo1PfmvIUOnsKXyJ pf7eSQCN/6YAznJ0lOxhFInpJWygcXUm9aQXOBMokMQ2egh/xuMTmUB8bqECISpWoXOB L40TwiWqcXLh+u8o6HXHmfKOCMGZ+Jznorxjc+qJ0VInfKrg5z1tb9YiJtDiYiJ1yEWK AMKJr1Kl7lqoehkr1ouNiqfRGof9D0p6bMuf8WuN9D11XfpweFQP0+Yq8rnrsHjNcwvp +fYnVsbM0XGWf+Hor5d9D31ON/leVKtk6TTdzQ5T1KJZDm6cGiQL3iBQhbaFu9AC0F+S ImsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697237318; x=1697842118; 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=fEjUcd2gIGh+rcuXSmEeq7H3LSdL8L2dg7mL1DHpCLA=; b=tzFGKGAXv0WwDmGd2W28h1HDEH3l0XLf32dBLzDz+62QDw9PLcQMa4AnItFqODeJdB tHrbSPHCsIDTyRxieUbOYIfykpqWuzC0IH80SePrDzGYje4niPGjLXwdSxYNLUic0Fzi MPzn9N4BBj28iRzOvaS35gPOoc2MU+htyEoJC7/vE2VD5VwamKLtAbthpHjR0SAfpf+T jSgPtsZsTMefo21lpHT2H2qRwHz6Vk+815T4vrULkU0jqhiAyIDTMg5tRFTIwi5J0UhD Ds3V4GbsuW9tCTmV3hXH9PvSCRdtzbTvPphVUZ0VvKTnN0y0vSEGBLlqeFOdlRALYJtU pYXw== X-Gm-Message-State: AOJu0YyuHRgnpb/jufxCMx2vc4DSRzr5hQlkrWbpFP6LZ/Fzw/bh4XtU 0m5/d/vIkPL2YCrVchxyHat/NdtHP+bMEA== X-Received: by 2002:a05:6e02:20e6:b0:350:b7a9:514b with SMTP id q6-20020a056e0220e600b00350b7a9514bmr35371309ilv.8.1697237317961; Fri, 13 Oct 2023 15:48:37 -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 t10-20020a92dc0a000000b003512c3e8809sm1683071iln.71.2023.10.13.15.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:48:37 -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, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v7b 07/25] dyndbg: drop NUM_TYPE_ARRAY Date: Fri, 13 Oct 2023 16:47:59 -0600 Message-ID: <20231013224818.3456409-8-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231013224818.3456409-1-jim.cromie@gmail.com> References: <20231013224818.3456409-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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 13 Oct 2023 15:49:04 -0700 (PDT) ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index b53217e4b711..8116d0a0d33a 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -106,11 +106,9 @@ struct ddebug_class_map { .mod_name = KBUILD_MODNAME, \ .base = _base, \ .map_type = _maptype, \ - .length = NUM_TYPE_ARGS(char*, __VA_ARGS__), \ + .length = ARRAY_SIZE(_var##_classnames), \ .class_names = _var##_classnames, \ } -#define NUM_TYPE_ARGS(eltype, ...) \ - (sizeof((eltype[]){__VA_ARGS__}) / sizeof(eltype)) /* encapsulate linker provided built-in (or module) dyndbg data */ struct _ddebug_info { -- 2.41.0