From: "Bjørn Mork" <bjorn@mork.no>
To: Allen Pais <allen.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org, souvik.k.chakravarty@intel.com,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2] drivers:platform/x86:Use ARRAY_SIZE() for the size calculation of the array.
Date: Wed, 13 Sep 2017 12:02:11 +0200 [thread overview]
Message-ID: <874ls6kjbw.fsf@miraculix.mork.no> (raw)
In-Reply-To: <1505292855-27476-1-git-send-email-allen.lkml@gmail.com> (Allen Pais's message of "Wed, 13 Sep 2017 14:24:15 +0530")
Allen Pais <allen.lkml@gmail.com> writes:
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>
> ---
> 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..6b63b3d 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}
What's the point? Why not simply replace all instances of TELEM_EVT_LEN
with ARRAY_SIZE?
Bjørn
next prev parent reply other threads:[~2017-09-13 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 8:54 Allen Pais
2017-09-13 10:02 ` Bjørn Mork [this message]
2017-09-13 10:17 ` Chakravarty, Souvik K
2017-09-13 10:52 ` Allen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ls6kjbw.fsf@miraculix.mork.no \
--to=bjorn@mork.no \
--cc=allen.lkml@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=souvik.k.chakravarty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®