lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Sep 2010 17:17:43 -0400
From:	Kyle McMartin <kyle@...artin.ca>
To:	Nikitas Angelinas <nikitasangelinas@...il.com>
Cc:	kyle@...artin.ca, deller@....de, jejb@...isc-linux.org,
	linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/8] arch/parisc/include/asm: use ARRAY_SIZE macro in
 mmzone.h

On Wed, Sep 08, 2010 at 10:11:13PM +0100, Nikitas Angelinas wrote:
> Replace sizeof(pfnnid_map) / sizeof(pfnnid_map[0]) with
> ARRAY_SIZE(pfnnid_map) in mmzone.h
> 

Thanks. Let me think about this, I don't really like the tangled web of
include dependencies this results in...

regards, Kyle

> Signed-off-by: Nikitas Angelinas <nikitasangelinas@...il.com>
> ---
>  arch/parisc/include/asm/mmzone.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/parisc/include/asm/mmzone.h b/arch/parisc/include/asm/mmzone.h
> index 9608d2c..85b23b6 100644
> --- a/arch/parisc/include/asm/mmzone.h
> +++ b/arch/parisc/include/asm/mmzone.h
> @@ -3,6 +3,8 @@
>  
>  #ifdef CONFIG_DISCONTIGMEM
>  
> +#include <linux/kernel.h>
> +
>  #define MAX_PHYSMEM_RANGES 8 /* Fix the size for now (current known max is 3) */
>  extern int npmem_ranges;
>  
> @@ -51,7 +53,7 @@ static inline int pfn_to_nid(unsigned long pfn)
>  		return 0;
>  
>  	i = pfn >> PFNNID_SHIFT;
> -	BUG_ON(i >= sizeof(pfnnid_map) / sizeof(pfnnid_map[0]));
> +	BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
>  	r = pfnnid_map[i];
>  	BUG_ON(r == 0xff);
>  
> -- 
> 1.7.2.3
> 
> 
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ