Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2398594pxb; Tue, 9 Mar 2021 01:14:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjogabtjL0LGga2I1OO+x8pbgnISng7dKszxvUrwXTdzmADFmiO6RX4oTJuWS36rD5yj1P X-Received: by 2002:a17:906:f283:: with SMTP id gu3mr11257042ejb.91.1615281268348; Tue, 09 Mar 2021 01:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615281268; cv=none; d=google.com; s=arc-20160816; b=YDhIiLMhoBy84r1qfhTKiSFDtoojzb1i9syf/FeH2UiGM0N8p0Opkfggvc6S4jtlTa JTzWVi0P84oR51gkL8yRqaHNbfmJ7vuHIU62QOS0UzyFvV/0ZOJ12qt28Nsr9EedVS5G PkP2WbHKkcKlHU1DheG5XknbYjTbo/KgajJwA7exBTRCPEvuzv7m7BybbZsJZ5R6ZeRM X/8YdNrrW2Ro3AObqyeCHeXBQlxvXZTseE0BiBz9+lQK4GC4RZlpAi3ed69SuyII4uzR sElftJEgty7OPRbSv3SX0iOgGMs4QqSAG0nmnRL0hgxbayQI5MZ9LdpwTUkLFMN6Y6Sf 9eQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=odin4M3HfTN7t7GK1MsaCd0qYM/RbSidTjhmywNNwls=; b=KD02Hp6yi+2vWEuLRBV13GicpAurFd+PEF6rpDmOaZsz7k7QW0VIT8kYernExxeMoL y4dxIfUBueKP7sO9I/N+tjTtLGMm0rv3a8hmZIInJttvL5jS5FUnez847scWVmkpnvci tzMOmqC8xjIh5JL3cXbiVqGq71cxi/GrKkQuc6ZlUKCa0rA2s17o6l0NVkhdrTFauaK0 AHaQAM3PxxRiMpxaioZrS7UX71itof8JWeYe/X3IIuXu4dF6mEHS4JpYH96GCmLG1Yf+ gU7iSPhWfZfl4118uXn+uI7s5zXfVrUp1439IfTqyXFGUzot+nuYO8LTwjPHtbdU5+/f 2pmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si9100285ejv.67.2021.03.09.01.14.05; Tue, 09 Mar 2021 01:14:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbhCIJM7 (ORCPT + 99 others); Tue, 9 Mar 2021 04:12:59 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:47767 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbhCIJMe (ORCPT ); Tue, 9 Mar 2021 04:12:34 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UR53oyc_1615281146; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UR53oyc_1615281146) by smtp.aliyun-inc.com(127.0.0.1); Tue, 09 Mar 2021 17:12:31 +0800 From: Jiapeng Chong To: peterz@infradead.org Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] perf tools: use ARRAY_SIZE Date: Tue, 9 Mar 2021 17:12:25 +0800 Message-Id: <1615281145-2122-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following cppcheck warnings: ./tools/perf/tests/demangle-ocaml-test.c:29:34-35: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/perf/tests/demangle-ocaml-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/demangle-ocaml-test.c b/tools/perf/tests/demangle-ocaml-test.c index a273ed5..2fac7d7 100644 --- a/tools/perf/tests/demangle-ocaml-test.c +++ b/tools/perf/tests/demangle-ocaml-test.c @@ -26,7 +26,7 @@ int test__demangle_ocaml(struct test *test __maybe_unused, int subtest __maybe_u "Stdlib.bytes.++" }, }; - for (i = 0; i < sizeof(test_cases) / sizeof(test_cases[0]); i++) { + for (i = 0; i < ARRAY_SIZE(test_cases); i++) { buf = ocaml_demangle_sym(test_cases[i].mangled); if ((buf == NULL && test_cases[i].demangled != NULL) || (buf != NULL && test_cases[i].demangled == NULL) -- 1.8.3.1