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]
Message-Id: <20060914112435.4ce28290.sfr@canb.auug.org.au>
Date:	Thu, 14 Sep 2006 11:24:35 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	David Howells <dhowells@...hat.com>
Cc:	torvalds@...l.org, akpm@...l.org, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH 5/7] Alter get_order() so that it can make use of
 ilog2() on a constant [try #3]

Hi David,

On Wed, 13 Sep 2006 19:35:31 +0100 David Howells <dhowells@...hat.com> wrote:
>
> diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h
> index a96b5d9..a7e374e 100644
> --- a/include/asm-generic/page.h
> +++ b/include/asm-generic/page.h
> @@ -6,20 +6,6 @@ #ifndef __ASSEMBLY__
>  
>  #include <linux/compiler.h>
>  
> -/* Pure 2^n version of get_order */
> -static __inline__ __attribute_const__ int get_order(unsigned long size)
> -{
> -	int order;
> -
> -	size = (size - 1) >> (PAGE_SHIFT - 1);
> -	order = -1;
> -	do {
> -		size >>= 1;
> -		order++;
> -	} while (size);
> -	return order;
> -}
> -
>  #endif	/* __ASSEMBLY__ */
>  #endif	/* __KERNEL__ */

After this patch, you don't need to include <linux/compiler.h> any more
(and, in fact, the file ends up essentially empty).  Is there a good
reason to move this function out of asm-generic/page.h?

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
-
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