Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940654AbdDTA76 (ORCPT ); Wed, 19 Apr 2017 20:59:58 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34950 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755771AbdDTA74 (ORCPT ); Wed, 19 Apr 2017 20:59:56 -0400 From: Karim Eshapa To: hubcap@omnibond.com Cc: linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro Date: Thu, 20 Apr 2017 02:59:42 +0200 Message-Id: <1492649982-15418-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 32 Let's use the defined kernel macro more safe and remove unnecessary cast. Signed-off-by: Karim Eshapa --- fs/orangefs/orangefs-debug.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/orangefs/orangefs-debug.h b/fs/orangefs/orangefs-debug.h index 387db17..becd229 100644 --- a/fs/orangefs/orangefs-debug.h +++ b/fs/orangefs/orangefs-debug.h @@ -12,6 +12,7 @@ #ifndef __ORANGEFS_DEBUG_H #define __ORANGEFS_DEBUG_H +#include "orangefs-kernel.h" #ifdef __KERNEL__ #include #else @@ -86,7 +87,7 @@ static struct __keyword_mask_s s_kmod_keyword_mask_map[] = { {"all", GOSSIP_MAX_DEBUG} }; -static const int num_kmod_keyword_mask_map = (int) - (sizeof(s_kmod_keyword_mask_map) / sizeof(struct __keyword_mask_s)); +static const int num_kmod_keyword_mask_map = ARRAY_SIZE( + s_kmod_keyword_mask_map); #endif /* __ORANGEFS_DEBUG_H */ -- 2.7.4