Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbdIMIvQ (ORCPT ); Wed, 13 Sep 2017 04:51:16 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:38647 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbdIMIvO (ORCPT ); Wed, 13 Sep 2017 04:51:14 -0400 X-Google-Smtp-Source: AOwi7QDPp8P52ALtASKhaUJ+6mB+VqIGf2HKF00inLMhvSjtmQEatmaoN+c7zLFi5PlEOGpCenc5/9kSLxLI29+6my4= MIME-Version: 1.0 In-Reply-To: <5F7315E704FA0841B5DFCE90329B2BB4661DAC5A@BGSMSX102.gar.corp.intel.com> References: <1505289772-26045-1-git-send-email-allen.lkml@gmail.com> <5F7315E704FA0841B5DFCE90329B2BB4661DAC5A@BGSMSX102.gar.corp.intel.com> From: Allen Date: Wed, 13 Sep 2017 14:21:12 +0530 Message-ID: Subject: Re: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array. To: "Chakravarty, Souvik K" Cc: "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 242 Lines: 10 >> #define TELEM_IOSS_PG_EVTS 30 >> >> -#define TELEM_EVT_LEN(x) (sizeof(x)/sizeof((x)[0])) >> +#define TELEM_EVT_LEN(x) (ARRAY_SIZE(x)) > The outer parenthesis seems redundant to me. > Will send out a v2. Thanks. - Allen