Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbdIAVaN (ORCPT ); Fri, 1 Sep 2017 17:30:13 -0400 Received: from www17.your-server.de ([213.133.104.17]:36294 "EHLO www17.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbdIAVaJ (ORCPT ); Fri, 1 Sep 2017 17:30:09 -0400 From: Thomas Meyer To: linux-kernel@vger.kernel.org Cc: Thomas Meyer Subject: [PATCH 3/6] ia64: Use ARRAY_SIZE macro Date: Fri, 1 Sep 2017 23:29:04 +0200 Message-Id: <20170901212907.5662-3-thomas@m3y3r.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170901212907.5662-1-thomas@m3y3r.de> References: <20170901212907.5662-1-thomas@m3y3r.de> 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: 868 Lines: 23 Found by a coccinelle run with: make coccicheck MODE=patch COCCI=scripts/coccinelle/misc/array_size.cocci Signed-off-by: Thomas Meyer --- arch/ia64/kernel/perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 09f86ebfcc7b..f1be357a4288 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -4653,7 +4653,7 @@ static pfm_cmd_desc_t pfm_cmd_tab[]={ /* 32 */PFM_CMD(pfm_write_ibrs, PFM_CMD_PCLRWS, PFM_CMD_ARG_MANY, pfarg_dbreg_t, NULL), /* 33 */PFM_CMD(pfm_write_dbrs, PFM_CMD_PCLRWS, PFM_CMD_ARG_MANY, pfarg_dbreg_t, NULL) }; -#define PFM_CMD_COUNT (sizeof(pfm_cmd_tab)/sizeof(pfm_cmd_desc_t)) +#define PFM_CMD_COUNT ARRAY_SIZE(pfm_cmd_tab) static int pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags) -- 2.11.0