From 74f45b739be635eaa4ec3a40dec6ad66084748c4 Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Tue, 14 Aug 2012 18:26:10 +0000 Subject: u-boot yaffs2: Fix compilation warnings Also remove yaffs_hweight and use the hweight in u-boot. Signed-off-by: Charles Manning --- fs/yaffs2/yaffs_hweight.c | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 fs/yaffs2/yaffs_hweight.c (limited to 'fs/yaffs2/yaffs_hweight.c') diff --git a/fs/yaffs2/yaffs_hweight.c b/fs/yaffs2/yaffs_hweight.c deleted file mode 100644 index d96773eb16..0000000000 --- a/fs/yaffs2/yaffs_hweight.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. - * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering - * - * Created by Charles Manning - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -/* These functions have been renamed to hweightxx to match the - * equivaqlent functions in the Linux kernel. - */ - -#include "yaffs_hweight.h" - -static const char yaffs_count_bits_table[256] = { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 -}; - -int yaffs_hweight8(u8 x) -{ - int ret_val; - ret_val = yaffs_count_bits_table[x]; - return ret_val; -} - -int yaffs_hweight32(u32 x) -{ - return yaffs_hweight8(x & 0xff) + - yaffs_hweight8((x >> 8) & 0xff) + - yaffs_hweight8((x >> 16) & 0xff) + - yaffs_hweight8((x >> 24) & 0xff); -} -- cgit v1.2.1