From: Heiko Carstens <hca@linux.ibm.com>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Hendrik Brueckner <brueckner@linux.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/tools: Use ARRAY_SIZE() to fix Coccinelle warnings
Date: Mon, 8 Apr 2024 13:51:04 +0200 [thread overview]
Message-ID: <20240408115104.9447-C-hca@linux.ibm.com> (raw)
In-Reply-To: <20240408105515.2328-3-thorsten.blum@toblux.com>
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@toblux.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.
next prev parent reply other threads:[~2024-04-08 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 10:55 [PATCH] s390/tools: Use ARRAY_SIZE() to fix Coccinelle warnings Thorsten Blum
2024-04-08 11:51 ` Heiko Carstens [this message]
2024-04-08 12:42 ` Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240408115104.9447-C-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=brueckner@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=thorsten.blum@toblux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox