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: <4CD19649.9060300@caviumnetworks.com>
Date:	Wed, 03 Nov 2010 10:05:13 -0700
From:	David Daney <ddaney@...iumnetworks.com>
To:	cdhmanning@...il.com
CC:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 4/9] Add yaffs ecc, mtd access and nand abstraction code

On 11/03/2010 09:53 AM, cdhmanning@...il.com wrote:
> From: Charles Manning<cdhmanning@...il.com>
[...]
> --- /dev/null
> +++ b/fs/yaffs2/yaffs_ecc.c
[...]
> +
> +/* Count the bits in an unsigned char or a U32 */
> +
> +static int yaffs_count_bits(unsigned char x)
> +{
> +	int r = 0;
> +	while (x) {
> +		if (x&  1)
> +			r++;
> +		x>>= 1;
> +	}
> +	return r;
> +}
> +
> +static int yaffs_count_bits32(unsigned x)
> +{
> +	int r = 0;
> +	while (x) {
> +		if (x&  1)
> +			r++;
> +		x>>= 1;
> +	}
> +	return r;
> +}
> +

These two can probably be replaced with the standard hweight32() and 
hweight8().

David Daney
--
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