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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Apr 2024 13:51:04 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Thorsten Blum <thorsten.blum@...lux.com>
Cc: Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Hendrik Brueckner <brueckner@...ux.ibm.com>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] s390/tools: Use ARRAY_SIZE() to fix Coccinelle warnings

On Mon, Apr 08, 2024 at 12:55:17PM +0200, Thorsten Blum wrote:
> Fixes the following two Coccinelle/coccicheck warnings reported by
> array_size.cocci:
> 
> 	WARNING: Use ARRAY_SIZE
> 	WARNING: Use ARRAY_SIZE
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
> ---
>  arch/s390/tools/gen_facilities.c   | 2 +-
>  arch/s390/tools/gen_opcode_table.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c
> index 68580cbea4e6..ebd8a947e97c 100644
> --- a/arch/s390/tools/gen_facilities.c
> +++ b/arch/s390/tools/gen_facilities.c
> @@ -149,7 +149,7 @@ static void print_facility_lists(void)
>  {
>  	unsigned int i;
>  
> -	for (i = 0; i < sizeof(facility_defs) / sizeof(facility_defs[0]); i++)
> +	for (i = 0; i < ARRAY_SIZE(facility_defs); i++)
>  		print_facility_list(&facility_defs[i]);
>  }

Let's wait until a compile bot reports compile error. It would be
helpful to at least compile patches, before sending them.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ