Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6716887rwb; Mon, 5 Dec 2022 17:01:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4U6nZusIjNt9OdTf76364UIeNz7L5SQt5svA3k6yQfl8/Hfc5iIZ/6i+TGBniFXG9/QF64 X-Received: by 2002:a17:907:a072:b0:7c0:ff74:facc with SMTP id ia18-20020a170907a07200b007c0ff74faccmr3563253ejc.515.1670288490178; Mon, 05 Dec 2022 17:01:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670288490; cv=none; d=google.com; s=arc-20160816; b=csQ8/V/hiaE3cOaVxscFBmDDmTbx51s6Fed7DizL7Hb+i+MVnZ/RUMiH/5pB9abDzE KYp6oL/P+2P/YlWTJPToXRHDfI9cTRoYkHiWODFuPQK62biO2KpSL8A3f3HF9MaqxPcE 5+Tx43d0S7bvgHsxaKda6xEePsF073104C+NBe4mDoX2Tz60/Gxrh11evcCDRaLWlZcc 8mwbNkcu7wUHSpVFYsF6XyWUwldjmTECszmIPe0ztu23ZFFA8zEMu6fyG063DbJoUCYo MB6IhnoFeQkIL40rKhVn8RvRyNHypW8LQnNyRrLf1S8p1xaq4g8gx9bCFmlAitUTnMX7 9oGw== 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=OqHcG8IoVHCeAot1jnlaRtsmWaAjiGKlPaDXWaVNPkE=; b=W9b+y3quJMUyggxjFng2W5L6KC/mnnrAaJ5gpSMc59C4BmQtFtU8SKC9X9SoHfe035 xM+GBiT32p/q6mcqJFv9xq8FQcSTmK7HUlvDh1HeMNGRlj1eAsODUhQBIGjiOa8vE9Yt ID4RoxVe+vdRkgDhVGwiG5qOqB+rDcwdOCBZSjGwRDhPeT65F0DA3tQq2Wn4A5ouY3lt fhLhg4HTPjbY/EoT9QVa4iHxNZm+NjS3IMrFNf0ArC50uk4vu9bfoKYuqOCKcGovxIaB erUSzWjLlJuyx6rB6WaPOaN5JFWnzWzB9D3MOiep9Evo8KSoBP7MZEaWrqjVYX4tnA5k AlRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="A7/mvKMv"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd10-20020a170907078a00b007c10ac7fe46si631438ejb.19.2022.12.05.17.01.11; Mon, 05 Dec 2022 17:01:30 -0800 (PST) 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=20210112 header.b="A7/mvKMv"; 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 S232037AbiLFAff (ORCPT + 79 others); Mon, 5 Dec 2022 19:35:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232378AbiLFAfL (ORCPT ); Mon, 5 Dec 2022 19:35:11 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 547D3209A5 for ; Mon, 5 Dec 2022 16:35:05 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id i83so2365809ioa.11 for ; Mon, 05 Dec 2022 16:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=OqHcG8IoVHCeAot1jnlaRtsmWaAjiGKlPaDXWaVNPkE=; b=A7/mvKMv6LDl78r2Rj9xCkoZIwaeMy/ak9988vd6t5HDbBlwgk4bnRXzsudLAya22e haZhic/e+DQ6ZU/O2o3COuZA+Tzcadp58eb9SsftWKK6LUK10YF3WSh9dCW/OLAGGozu VAE1G/L8wXaH4sZsupUAL0tB3cmyIK+vpVcmF+NHT2Y+9GDML0mztfJz9MxRvv4TMQN4 T/IeL73CFbxzkW0yRaI7gJpfPyQrpCS0yPDp213t+4jJNtEeXs06wc0Hx5SxdQ1QfUiE K43T7/O2AaYd/OcJZZ6D1mOnXsinMxcOzmdaih4LwfQFT4iaO4ZskuIC19ZKqCH2ZR7S 54JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OqHcG8IoVHCeAot1jnlaRtsmWaAjiGKlPaDXWaVNPkE=; b=N7u3I/LyZ+MTL2UnRdZA5aKNVHOILO+iWQD2U2I/432umBb4DlwShpHf9/VyT97zWQ 3UkYpDdnZwxo/AmFw8aj/dqPaYihPO3qwdGLE504kRZbakdRGcn9ZGcjrZLnbe5Kurb1 lT+OjlsDDtpJzDlJGULX7r+hP/5hOPOkf0tug/RLOVQAOlshAfVqzdSGIeWYFe5QoWTo pz6X7p4p4MLyHGFstOx0NrWLVloTKc1eXxxYRX1OFFP/Qg2qdr2Sl44mm2TWInwCpvOR wEis7IhwkkB7m+VJeB96vIacwug1x8GE6gkr6JaWAPhgIULXEvK3dlWU3M2wmoO7SH3g WwUw== X-Gm-Message-State: ANoB5pkmGYviZe4iE4v/uSNGoYFoPRO7PMeLsdXS6c69+X0Tj3tPKpN8 tkhxK4zHQwVjUfW1Va8lda8y6mRah5o1PQ== X-Received: by 2002:a5d:954c:0:b0:6e0:17f6:4c2a with SMTP id a12-20020a5d954c000000b006e017f64c2amr2157044ios.129.1670286904403; Mon, 05 Dec 2022 16:35:04 -0800 (PST) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id x3-20020a056602160300b006bba42f7822sm6408213iow.52.2022.12.05.16.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 16:35:03 -0800 (PST) From: Jim Cromie To: 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, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, jbaron@akamai.com, gregkh@linuxfoundation.org, Jim Cromie Subject: [RFC PATCH 07/17] dyndbg: drop NUM_TYPE_ARRAY Date: Mon, 5 Dec 2022 17:34:14 -0700 Message-Id: <20221206003424.592078-8-jim.cromie@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206003424.592078-1-jim.cromie@gmail.com> References: <20221206003424.592078-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 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 ARRAY_SIZE works here, since array decl is complete. 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 bf47bcfad8e6..81b643ab7f6e 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -104,11 +104,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.38.1