lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff609f47-f39d-454a-9222-0efe6ee8a9b3@bootlin.com>
Date: Tue, 25 Feb 2025 15:09:57 +0100
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: Jim Cromie <jim.cromie@...il.com>, linux-kernel@...r.kernel.org,
	jbaron@...mai.com, gregkh@...uxfoundation.org, ukaszb@...omium.org
Cc: intel-gfx-trybot@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
	amd-gfx@...ts.freedesktop.org, intel-gvt-dev@...ts.freedesktop.org,
	intel-gfx@...ts.freedesktop.org, daniel.vetter@...ll.ch,
	tvrtko.ursulin@...ux.intel.com, jani.nikula@...el.com,
	ville.syrjala@...ux.intel.com
Subject: Re: [PATCH 08/63] dyndbg: drop NUM_TYPE_ARRAY



Le 25/01/2025 à 07:45, Jim Cromie a écrit :
> ARRAY_SIZE works here, since array decl is complete.
> 
> no functional change
> 
> Signed-off-by: Jim Cromie <jim.cromie@...il.com>

Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>

> ---
>   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 2b0057058ecf..e458d4b838ac 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 {

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ