[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <506AC19F.3000900@linux.vnet.ibm.com>
Date: Tue, 02 Oct 2012 15:57:43 +0530
From: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Shai Fultheim <shai@...lemp.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Andreas Herrmann <andreas.herrmann3@....com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs()
On 10/02/2012 02:04 PM, Dan Carpenter wrote:
> Using ARRAY_SIZE() is more readable.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.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;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists