Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp453171lqo; Thu, 16 May 2024 10:45:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHRU5kx2DhBStPheKeyWBuHKb9yAFYOEAhnbFq+U3StCo9rAkhBY7aWbjof2iuCi7SO5bTeTnN8h9VEeNwvc9YQ0PSJKdoe22rQKg0VA== X-Google-Smtp-Source: AGHT+IGeAFb+/oo8NIZ8Zfu0WZiXYVxdeMkJX6jOkRpdINLAsLXHcoofqMvTiE8jbcMYD21TbT+q X-Received: by 2002:a05:622a:144d:b0:43a:357c:322a with SMTP id d75a77b69052e-43dec3a85b1mr399984441cf.34.1715881546911; Thu, 16 May 2024 10:45:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715881546; cv=pass; d=google.com; s=arc-20160816; b=kttryR5vjE4wBLa4RIBWq1j9CjHjJyxhm0VGiiCy5GyFQ3MNby1U00j8pZNQgiGvGG SQF3krrnhXDnevkbrxQwZJ5lGLQtLo4fCrDprR3GZoo+chx+fj9XPP/mSEmy8JV6W7td b+/q1lccRI1UdyEOt7orgq17/Qgh8kEdO7pcH7+3i9klT/yxgHpAS9/YnlvBrPBMtkLW MLjxwlvn5f38t/aZDLyt7XSjZrPssa3TT1lT8FyQhT7SWaQolqAS94JmMwqQcTllNG92 i4bBwdngPKXmDSLA3i7KZFBmQFqLxSxfZiN+23cwjqYpKhPLCq2zn4wNAXbmo1RI06EK XiwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/0mUDwLsKTvN+KYpp0nKUCtynM6CNCM+YNZSzAF3Qbg=; fh=gzkXYsYxR+DmL7i4aoSLW5d9L8FZyXkcuy53hFvxhkU=; b=OnJjdTmF+/d27xKad59nXt4SOtTIrgX+Q43USS1ZbfbrPqpqQO6AryswkUEqSCjpc1 /cxqtgwCLPS8PjO+AfX6aPQ4iMdPCAkHOt35jE1qP4/XWAql7BKX3uz/I3ORBGG8Nwvk 6esGv47Lj+eevx7SmwINiF/nH93Rx5lP5osZO1ylbjkZQgHrBddVw+Ef0rAKwdjZZjtG yrgEQCPF0QXymLM18WAAJ1kd+EKS/zUY9+uKeE1vruEsG65bP56k2XO0qebg5juyRHdt RCDm0E3aiHwnUxe86Poe/nnsRAQSx1JZbnRuQOQDm6JvNjvFXdUWEOe19rAeBK/297fR c24w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Isq9LXxu; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43e2ccb5b33si58650961cf.571.2024.05.16.10.45.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:45:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Isq9LXxu; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181390-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181390-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A32861C214C1 for ; Thu, 16 May 2024 17:45:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EDB71581FE; Thu, 16 May 2024 17:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Isq9LXxu" Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FAAB157E78 for ; Thu, 16 May 2024 17:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881460; cv=none; b=SRk0jUO67jJM/ozJ2U0oG23JFNC2007P0AoyVw1G7JO5sRyIxXrAwx1YBEaxWeOSWctYDe+UwEGekOc/zxeYJFhLZbGDqIZasLvn5FGrqcPlhHP29GoTUrtr+NxXvkZn+TAFUPUJGQa5RYYAvN4oZKEhiJp6lAjS+CNd7cN42iM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881460; c=relaxed/simple; bh=qhaSWleYG+r3n9pGZPTsZ6CKG0mS38934T1f4hN35uc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mLFpatWBFvJO9s7Bsb636oGghqLQ0VoChf+a7TSPK04E+pce0lUxvqUJzulI8vAy5qk62TAiReDkDvsbAQMTKlIXqW9H55jnGgQSgwqw+rnWgwDAUXBz8+8kDnu/kXgy9vu0oaVrxk8Kl4yXQEM5IcGme/Jrdh7QIkPvCIg9QjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Isq9LXxu; arc=none smtp.client-ip=209.85.166.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7e1b887c488so29574439f.0 for ; Thu, 16 May 2024 10:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715881458; x=1716486258; 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=/0mUDwLsKTvN+KYpp0nKUCtynM6CNCM+YNZSzAF3Qbg=; b=Isq9LXxuLwRfNKIQYfhVHtfQMI0yjnZRL+WNsPAyhet39lZDvXImPGw30D/XIgHI2p E3PwCHueAGfKvGKHQDdzHowe3d1VgUeELYZ2IfE9JIWPGausjvs9I1QCfQyHt8hjq4Dz soFz6ELnHeIYtYZdj66tTlO+CxjWXoi1P+iCEnjcyJrfL0It9qDVTOl4hgQqPJ3Ls1IA OLVBGVANPGlcEgWR3mjtkvxRe2QbbhMhBJLhuFERotXl5PGm6Da6NNnUGKaIl3vXStgQ zPKP11HTrTu+sKfBC8++k51sb5LZR1CL/jvRVqX0rxVkitGIOy8I5KcpE7VkibDtpoJt oLmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715881458; x=1716486258; 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=/0mUDwLsKTvN+KYpp0nKUCtynM6CNCM+YNZSzAF3Qbg=; b=H2TyJDVbHVZ0oVY8jUf5MmXM2hkcU4rlmWqlIAGPr5H/rkfh1h/Kmp8a50qMJcvq+C l5Gk+qfuRN6lXQ34BPAyc1hH2DdHVAMTHXEj9LAbnoeV+jLFwphy71GBB0G/SJH4ttvo /SxSR9RpYsZbGZmLXl6UPwoBjyscBSxZlJYLaxJmYGhpcsLFDb1+ws/NaWviKWI9JVFI c2ix6gUL2rADMpG/WwdTkvyqyy2fqV8RIGQvqD/97N4YhEMSpS9tZqcCgCynpBjl4IgB lYC1ILEP1ZXffK0h6HexjNdK9ysk49eFVGIi52JMOD4VRambNFHcdtbAKF5D2eYdWf/I zYUA== X-Forwarded-Encrypted: i=1; AJvYcCXfFj84ox5vggXSfLhwZmjEvYVUvQlWL3qimPKfTf1/L7bPe0Zr00e4oO9LssMqa+q+/KVXmFz2Qb8ju5WK/TkYow78NX4yFglKDKn4 X-Gm-Message-State: AOJu0YyYeHNEgoiVWVoGyKHGthHHmJT4ktr3pPvL/e1odND6g+QGZnKm E1rk1Z5oySHUDKLaSR8dPF61w7kHREDJUqVRUTT6ScieGhuzt8pA X-Received: by 2002:a5d:8358:0:b0:7de:cb34:98ad with SMTP id ca18e2360f4ac-7e1a337fa7dmr1822853239f.1.1715881458411; Thu, 16 May 2024 10:44:18 -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 8926c6da1cb9f-4893715057csm4273595173.80.2024.05.16.10.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:44:18 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: ukaszb@chromium.org, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, Jim Cromie Subject: [PATCH v8-RESEND 08/33] dyndbg: drop NUM_TYPE_ARRAY Date: Thu, 16 May 2024 11:43:32 -0600 Message-ID: <20240516174357.26755-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240516174357.26755-1-jim.cromie@gmail.com> References: <20240516174357.26755-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.45.0