[PATCH] KVM: s390: fix array_size.cocci warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix following coccicheck warning:

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

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux