Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1731471

Re: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array.

From Allen <allen.lkml@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array.
Date 2017-09-13 11:00 +0200
Message-ID <upbGx-542-15@gated-at.bofh.it> (permalink)
References <upaUa-4Kl-17@gated-at.bofh.it> <upbwS-50A-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>>  #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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array. Allen Pais <allen.lkml@gmail.com> - 2017-09-13 10:10 +0200
  RE: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size  calculation of the array. "Chakravarty, Souvik K" <souvik.k.chakravarty@intel.com> - 2017-09-13 10:50 +0200
    Re: [PATCH] drivers:platform/x86:Use ARRAY_SIZE() for the size  calculation of the array. Allen <allen.lkml@gmail.com> - 2017-09-13 11:00 +0200

csiph-web