Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbdIMIDE (ORCPT ); Wed, 13 Sep 2017 04:03:04 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37764 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbdIMIC7 (ORCPT ); Wed, 13 Sep 2017 04:02:59 -0400 X-Google-Smtp-Source: ADKCNb7o45Q2xpikv2OQ/3DhI2SQzzw74r6L6njdKWhAn/Hdk/xkVX7l6dGLdYZPaDVwCFGmllt55Q== From: Allen Pais To: linux-kernel@vger.kernel.org Cc: souvik.k.chakravarty@intel.com, platform-driver-x86@vger.kernel.org, Allen Pais Subject: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array. Date: Wed, 13 Sep 2017 13:32:52 +0530 Message-Id: <1505289772-26045-1-git-send-email-allen.lkml@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: 710 Lines: 20 Signed-off-by: Allen Pais --- drivers/platform/x86/intel_telemetry_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c index d4fc42b..3ccc7ac 100644 --- a/drivers/platform/x86/intel_telemetry_debugfs.c +++ b/drivers/platform/x86/intel_telemetry_debugfs.c @@ -76,7 +76,7 @@ #define TELEM_IOSS_DX_D0IX_EVTS 25 #define TELEM_IOSS_PG_EVTS 30 -#define TELEM_EVT_LEN(x) (sizeof(x)/sizeof((x)[0])) +#define TELEM_EVT_LEN(x) (ARRAY_SIZE(x)) #define TELEM_DEBUGFS_CPU(model, data) \ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&data} -- 2.7.4