Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbdIAVaL (ORCPT ); Fri, 1 Sep 2017 17:30:11 -0400 Received: from www17.your-server.de ([213.133.104.17]:36292 "EHLO www17.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbdIAVaJ (ORCPT ); Fri, 1 Sep 2017 17:30:09 -0400 From: Thomas Meyer To: linux-kernel@vger.kernel.org Cc: Thomas Meyer Subject: [PATCH 1/6] perf tools: Use ARRAY_SIZE macro Date: Fri, 1 Sep 2017 23:29:02 +0200 Message-Id: <20170901212907.5662-1-thomas@m3y3r.de> X-Mailer: git-send-email 2.11.0 X-Authenticated-Sender: thomas@m3y3r.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 23 Found by a coccinelle run with: make coccicheck MODE=patch COCCI=scripts/coccinelle/misc/array_size.cocci Signed-off-by: Thomas Meyer --- tools/perf/tests/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 5876da126b58..4e7b5b63ac28 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -309,7 +309,7 @@ static int check_env(void) } err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns, - sizeof(insns) / sizeof(insns[0]), + ARRAY_SIZE(insns), license, kver_int, NULL, 0); if (err < 0) { pr_err("Missing basic BPF support, skip this test: %s\n", -- 2.11.0