[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <56879380.12c.1847049393b.Coremail.wangkailong@jari.cn>
Date: Sun, 13 Nov 2022 17:19:17 +0800 (GMT+08:00)
From: wangkailong@...i.cn
To: hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
borntraeger@...ux.ibm.com, svens@...ux.ibm.com,
imbrenda@...ux.ibm.com, thuth@...hat.com
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: s390: fix array_size.cocci warning
Fix following coccicheck warning:
arch/s390/tools/gen_facilities.c:151:37-38: WARNING: Use ARRAY_SIZE
Signed-off-by: KaiLong Wang <wangkailong@...i.cn>
---
arch/s390/tools/gen_facilities.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c
index cb0aff5c0187..f607e5092f8d 100644
--- a/arch/s390/tools/gen_facilities.c
+++ b/arch/s390/tools/gen_facilities.c
@@ -148,7 +148,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]);
}
--
2.25.1
Powered by blists - more mailing lists