Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp17273rdh; Wed, 22 Nov 2023 16:28:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqF7xkj6BVM2VxxtAJ/R+bHJ5dzbt3jXunnz9a00EtC/cmLmKXEQQnLzXZ5He1/CEa6R47 X-Received: by 2002:a05:6a00:4091:b0:6cb:4361:9f75 with SMTP id bw17-20020a056a00409100b006cb43619f75mr4712623pfb.22.1700699290757; Wed, 22 Nov 2023 16:28:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700699290; cv=none; d=google.com; s=arc-20160816; b=be+Ih2LTJBpKaNaMagrXmbwEAQ/IUfj7/2zZF6z14cHm35WKKmIrCV9HpStwUP7+2w Ap75+D1AgvjOf16jVHCrhaHhXzaaL0Fp7nt4nNaTZuBE7cY7PGrBaCxrCmgdeMIJjaK5 w1N3kqEzwlMa1heU6kFukzcPrdr//7sHakhJUGkRTSK26+UsyXWOdP2oI2Z9yhdtBLGr NOWC5uHF8YscJ2KysSKTL5OUNsyheFzBEagHSYsbzm1INZAwm0GHhm7UhUjqzYeYhQM6 n0QMYXzfDfAi7uLkKlSVX3sM+kdqpBFFFjJhWGB1EPe38UJMsFg6aG5KmVt7LdzEC8yU F6ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=x4ZQqedJYLGPYSK+d7G5PNiQr9d+Gw8ba+LcRhYj45A=; fh=82PbTiji9xY6w3jfYPx/ZRFPHZi71CeyMofq+upoEKU=; b=Scdp1wjLnZjZBhvDmKhy9hSa6N6rJw5uRAFSuqK4QYQA86jq1O+PDznrxsxSg5NRDl vR99qwtAWAN0OdP41xblV+pUt/op2ccwGwBX1MMMFwrnqAHRDCBKWk5EtMYEpagAWvEy 0NEYzfdtiRLsV4+6M1MHR4FszQMFVMSWO9XNz4/mxfviqkpfmjKEJqT0M025NYOfpLxD VMaI6BbB4Y6IAX2SKGJIqOF14ob8eerbePqEI9j/vHUQ3pTFbDTn0x98eNGdlo5F+EtJ TKKmxjxkQkCLAG1UDbJKknQFtLKgwXKvoFFOPg1JNB4CnsRlwq9vMwDEadepF0sMz029 T/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=YPC8I2Y5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id b36-20020a631b24000000b005aa83686f32si214419pgb.42.2023.11.22.16.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 16:28:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=YPC8I2Y5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5A9008244E5E; Wed, 22 Nov 2023 16:28:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344109AbjKWA0i (ORCPT + 99 others); Wed, 22 Nov 2023 19:26:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231738AbjKWA0h (ORCPT ); Wed, 22 Nov 2023 19:26:37 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F937100 for ; Wed, 22 Nov 2023 16:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1700699192; bh=x4ZQqedJYLGPYSK+d7G5PNiQr9d+Gw8ba+LcRhYj45A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YPC8I2Y51EwzLJV2d79l8abHDqwqoEm3vGEo2qWzyoLyBcQ5JdMhbBqj4iXNalv+R 7oUNbrvjHmDzljIQGxEKhzff4EXfvuO8dUquzjPYSqhzwxjuMSf11xmT6OxyvNZwya 61tfvYtMPH4+L53N59qS8/NxVg5VqFGRhWO99nmTG2k5sHQnWwKubKrzS0whjuzfKO arebV4JFb2GWg8Zo3dymdohx/UqOAc82d7JPz1cpzXSNo1RZemk28J04xolONPAC2C CSq8nYUWK+Wv/zKrQ18bo6T5l0xisx96lkzML/VjoMp1Xi1PCKmI6x1PzuClkJhU80 nqxpcRcm9zwtw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SbJnh0btLz4x5n; Thu, 23 Nov 2023 11:26:31 +1100 (AEDT) From: Michael Ellerman To: Jiapeng Chong Cc: npiggin@gmail.com, christophe.leroy@csgroup.eu, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: Re: [PATCH] powerpc: Use ARRAY_SIZE for array length In-Reply-To: <20231122090312.114679-1-jiapeng.chong@linux.alibaba.com> References: <20231122090312.114679-1-jiapeng.chong@linux.alibaba.com> Date: Thu, 23 Nov 2023 11:26:31 +1100 Message-ID: <874jhds4aw.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 16:28:08 -0800 (PST) Jiapeng Chong writes: > Use of macro ARRAY_SIZE to calculate array size minimizes > the redundant code and improves code reusability. > > ./arch/powerpc/xmon/ppc-opc.c:957:67-68: WARNING: Use ARRAY_SIZE. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7612 > Signed-off-by: Jiapeng Chong > --- > arch/powerpc/xmon/ppc-opc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) This code is copied from binutils, we don't take cleanup patches to it. See also the at least three times this has already been submitted :) https://lore.kernel.org/all/4ed43222-17b0-8355-f836-adabb453e432@csgroup.eu/ https://lore.kernel.org/linuxppc-dev/20181004171036.GA1907@embeddedor.com/ https://lore.kernel.org/linuxppc-dev/874lfxjnzl.fsf@concordia.ellerman.id.au/ cheers