From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Shai Fultheim <shai@scalemp.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs()
Date: Tue, 02 Oct 2012 10:39:43 +0000 [thread overview]
Message-ID: <506AC19F.3000900@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121002083409.GM12398@elgon.mountain>
On 10/02/2012 02:04 PM, Dan Carpenter wrote:
> Using ARRAY_SIZE() is more readable.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Regards,
Srivatsa S. Bhat
> diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
> index 9a7c90d..93c5451 100644
> --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
> +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
> @@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void)
> if (attrs)
> return attrs;
>
> - n = sizeof (default_attrs) / sizeof (struct attribute *);
> + n = ARRAY_SIZE(default_attrs);
>
> if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
> n += 2;
>
WARNING: multiple messages have this Message-ID (diff)
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Shai Fultheim <shai@scalemp.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs()
Date: Tue, 02 Oct 2012 15:57:43 +0530 [thread overview]
Message-ID: <506AC19F.3000900@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121002083409.GM12398@elgon.mountain>
On 10/02/2012 02:04 PM, Dan Carpenter wrote:
> Using ARRAY_SIZE() is more readable.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Regards,
Srivatsa S. Bhat
> diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
> index 9a7c90d..93c5451 100644
> --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
> +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
> @@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void)
> if (attrs)
> return attrs;
>
> - n = sizeof (default_attrs) / sizeof (struct attribute *);
> + n = ARRAY_SIZE(default_attrs);
>
> if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
> n += 2;
>
next prev parent reply other threads:[~2012-10-02 10:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 8:34 [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs() Dan Carpenter
2012-10-02 8:34 ` Dan Carpenter
2012-10-02 10:27 ` Srivatsa S. Bhat [this message]
2012-10-02 10:39 ` Srivatsa S. Bhat
2012-10-05 7:22 ` [tip:x86/urgent] x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs( ) tip-bot for Dan Carpenter
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=506AC19F.3000900@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=andreas.herrmann3@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=shai@scalemp.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.