public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: s390: fix array_size.cocci warning
@ 2022-11-13  9:19 wangkailong
  2022-11-13 10:29 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: wangkailong @ 2022-11-13  9:19 UTC (permalink / raw)
  To: hca, gor, agordeev, borntraeger, svens, imbrenda, thuth
  Cc: linux-s390, linux-kernel

Fix following coccicheck warning:

arch/s390/tools/gen_facilities.c:151:37-38: WARNING: Use ARRAY_SIZE

Signed-off-by: KaiLong Wang <wangkailong@jari.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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-13 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-13  9:19 [PATCH] KVM: s390: fix array_size.cocci warning wangkailong
2022-11-13 10:29 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox