Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2999444rdb; Tue, 12 Sep 2023 21:00:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeervL1BPshYdt5brpLL7HTPdBY7gumjVla2OcJQjaJdOGXPkpD6e+LSHm3Mnjbx8fK539 X-Received: by 2002:a05:6808:14cf:b0:3ab:5592:4704 with SMTP id f15-20020a05680814cf00b003ab55924704mr2378813oiw.2.1694577644341; Tue, 12 Sep 2023 21:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694577644; cv=none; d=google.com; s=arc-20160816; b=pxWgSlAmphwxhbhsHVSeTBe76wHm+4OjJ0snNdluMSZSjkCwdrX6ffjSgFWuDVp4YK c4hugewbTDU/2shqfEGrekZiwze9GainazrOLw6AySJKDF3OUPcykTzN8T9IejK98K+D RDXZYebIruKDjLjRwTAbP8GPT1nKX5ckTUJb5ac5r+Cz+vnfM0vYMMuQMWBYZixd1xI+ QODVQkGjIBQfF4Qnqg5Y5m4JWbdxk3NafUlat7XQ6sHvcbMDe4nR25Piq4dReh3jR7xX fLahqWxMU5UlOjSURgsmjKJX3nsM3TgByFpdFMSRihgXWWrJ4a6p/G/Oz0pDgwYHB5Dv 23Jw== 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=lxaKKEVRHc4DKNzSwZQ1vuzFBPp/LFY0Le4b1Q6OMeE=; b=qRcgONhA5DVHCiUlOs99LiK/ugHZjBQnlCV08sRudh/jjLtmy8dqnYs0j0gshxGWOr pPkPdKqDPYNBD8sOJiQUYKEm89X8Uj88cQczgOGq7R+SxLjjr8TMl6Y24dVJHL0n3Osu 0LRTjciqVfIrZv3NYNCrVdVTYLYrGZltvOZG8AaWSQKgE4xC6JE6xWjWfuJACA2oUx/x rUUaC1mFiAAE9jyO7sDl+/a1Ns1t3Bgbvnviwu1wfLP06aB2j/24YfINOCH6/NslEfjp 5GchODG6Y15Dam7SxdlNY8SQMSKAHqSJHN+/LNfoAK/zGir6FNEm6xNmTMTTGTfF9T7F VSpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="ASO/gCBV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id az1-20020a056a02004100b005704f061aecsi6057194pgb.279.2023.09.12.21.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 21:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="ASO/gCBV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 B357F8315555; Mon, 11 Sep 2023 21:29:45 -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 S236779AbjILCRy (ORCPT + 99 others); Mon, 11 Sep 2023 22:17:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236928AbjILCRm (ORCPT ); Mon, 11 Sep 2023 22:17:42 -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 5008EE3C05; Mon, 11 Sep 2023 16:10:13 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-34f359949afso16193895ab.1; Mon, 11 Sep 2023 16:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694473730; x=1695078530; 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=ASO/gCBVMz/RJd6PZ9BAME2Fvmw5PGyUx6hD+ebsaE1A6K19Z3ZdaF2W+bB3249hEU P4M+0eSBoxQm96j8ahaiaSgxi9NOYCuMyM5WqZYexQo+/ScIbmNiHAKiSGew0dyna2iV DX92s3QBin49PWpmmkazpeqESP/Eu2Cabbd3SpWK2waIfxFwMdqvYtnfHDy3IYiA23J1 LCr73sV9dRGYPWei5flwXuLu4NIxzJNtAYkWgqd0tIHrEIww4J3nbhb8SWOMsjlgmSlZ aC7SEREOcor0Ocv1hzQBJDwnQ136aoXm+tFjnRp30ajJ0kllVFvi5aECpg5Afuv1phtd f6XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694473730; x=1695078530; 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=op7aET9RHuVf2xriorKjed+AfspdMY0jJy03Vsp1yvWU1PcTGKCyoI/y+BKVJoK47F w4bEXvIK/2rdjpMDvpYYbCeEz+jQOe5Zhnw5jAI73g0IeZxjZ4kp9aVrPkg7Z7yCuGfC BAD9qLil2QGkN45CIhir/haGRlrd/r/fHZ3RzBoWfcxlsUlMaH9eyTMaO7eOSUYm9TuJ D59qqBCQGcRJoGqtI4KKWCADisDgYOp/+pKtn0sggfbqBJG3Hqkr3bg33PymB9zpvdZ6 dEB85IdiGEaxvH4X5kOCknv0n4EVtaiRFkx9NvLzcpuTtPIyIs2LRIfb0Se/gOH+Tj5r iOWQ== X-Gm-Message-State: AOJu0YwWzlVWAKINUrA4kLFj5Z5am+rl26if0PNBkRqS8RC9hBWPAYaS muhpGAoldc13LOXimwUk04w= X-Received: by 2002:a05:6e02:20cc:b0:34c:e84b:4c5c with SMTP id 12-20020a056e0220cc00b0034ce84b4c5cmr13702891ilq.27.1694473729966; Mon, 11 Sep 2023 16:08:49 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 16:08:49 -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 06/22] dyndbg: drop NUM_TYPE_ARRAY Date: Mon, 11 Sep 2023 17:08:22 -0600 Message-ID: <20230911230838.14461-7-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:29:45 -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