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] [day] [month] [year] [list]
Date:	Tue, 06 Feb 2007 09:16:56 -0800
From:	Auke Kok <auke-jan.h.kok@...el.com>
To:	"Ahmed S. Darwish" <darwish.07@...il.com>
CC:	cramerj@...el.com, john.ronciak@...el.com,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 2.6.20] e1000: Use ARRAY_SIZE macro when appropriate

Ahmed S. Darwish wrote:
> Hi,
> 
> A patch to use ARRAY_SIZE macro already defined in kernel.h.
> 
> Signed-off-by: Ahmed S. Darwish <darwish.07@...il.com>

Acked-by: Auke Kok <auke-jan.h.kok@...el.com>

Cheers,

Auke

> ---
> Patch is compile tested.
> 
> diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
> index fb96c87..d21706e 100644
> --- a/drivers/net/e1000/e1000_ethtool.c
> +++ b/drivers/net/e1000/e1000_ethtool.c
> @@ -746,7 +746,7 @@ err_setup:
>  	uint32_t pat, value;                                                   \
>  	uint32_t test[] =                                                      \
>  		{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};              \
> -	for (pat = 0; pat < sizeof(test)/sizeof(test[0]); pat++) {              \
> +	for (pat = 0; pat < ARRAY_SIZE(test); pat++) {              \
>  		E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W));             \
>  		value = E1000_READ_REG(&adapter->hw, R);                       \
>  		if (value != (test[pat] & W & M)) {                             \
> 
-
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