From patchwork Sun Nov 13 09:19:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 19313 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1613467wru; Sun, 13 Nov 2022 01:39:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf7X/ViDu66DEcpxEJ095IJRNrAPSB6kHVKSI/4SSXKIolOtJmRprhHGphvZL86IiLj0TPpB X-Received: by 2002:a50:fe88:0:b0:467:9f6b:d80 with SMTP id d8-20020a50fe88000000b004679f6b0d80mr3251154edt.18.1668332370764; Sun, 13 Nov 2022 01:39:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668332370; cv=none; d=google.com; s=arc-20160816; b=hF8XGxG/s942lh3p/mwAXNZAmTb3rzl7QsoNeJpNyhnj8GV2eBJQSPBi7flfMg7L6D IOJXOwZlA43QNtj1MgyIvFuT8jteMm2MZJmNjSi2pf49UXBpEuBCjFrRQ7C1FSXl/IBT /4WpwqbG80ChXqzAqQFpxRgl1woVra7cl58ErU6zmRuPWmHsMDk1la7mcE4jaAlXqYVD ZYeNidOQ/9iP+tduUrYIvS+DzcTmXlKJs5es9wZhoC0DJ+1em1tJzDGOM/T1aP7tCdLL TJhvTL3ZBKcgZancV5fVaPIGFVijLJDOGyutrgfiP/jSKqjucQc5Y9YOV8ZhmpHrl/KC rSKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=DJFlg7FFSGIfCTBl7qNRH0XgiuJaWQZo1Lh2StaK89Y=; b=zCvqqsGNBlTeTVZKjS5sA3Lqq8r6Ml4Y+W1ltDbqr16WSS17orW3Hx9V0XgJHHX91K 7PXU9A8al8RZ5u1iR1eI+nqwnDHXDLwv0r+iY+D/cDTB/hMLjcFMY5fkGh3tjMSwvFUP 9Wc8EjCPF74dizBl1PIFjowqn32q3B9efR7XjsE0B46TtMwx2ukigm7Kq/R70ZN3AUQt EJQ/P1HA+J86sFaPHn4bsUn+zzmWN7c4iaaboTcXiemAZTK5NXY4QuuUnVM5xNDXp+4h hZtpdAlxzcwlIiVAVZw9XicBi0uRdFbBePWE1cjoi8/NmJPuBLahk9+NUo152OASXphS orxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a05640234d300b0046649cd87c2si8103696edc.32.2022.11.13.01.39.07; Sun, 13 Nov 2022 01:39:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235182AbiKMJYP (ORCPT + 99 others); Sun, 13 Nov 2022 04:24:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233029AbiKMJYN (ORCPT ); Sun, 13 Nov 2022 04:24:13 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E20F912D01; Sun, 13 Nov 2022 01:24:12 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 13 Nov 2022 17:19:17 +0800 (GMT+08:00) X-Originating-IP: [182.148.14.167] Date: Sun, 13 Nov 2022 17:19:17 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, imbrenda@linux.ibm.com, thuth@redhat.com Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: s390: fix array_size.cocci warning X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <56879380.12c.1847049393b.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXn+CVtnBjXxoDAA--.54W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAEB2FEYx0DfwAQs1 X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VW7Jw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749373283924756281?= X-GMAIL-MSGID: =?utf-8?q?1749373283924756281?= Fix following coccicheck warning: arch/s390/tools/gen_facilities.c:151:37-38: WARNING: Use ARRAY_SIZE Signed-off-by: KaiLong Wang --- 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]); }