* [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings
@ 2012-08-15 4:26 Charles Manning
2012-09-02 14:47 ` Wolfgang Denk
2012-10-03 21:01 ` Marek Vasut
0 siblings, 2 replies; 3+ messages in thread
From: Charles Manning @ 2012-08-15 4:26 UTC (permalink / raw)
To: u-boot
Also remove yaffs_hweight and use the hweight in u-boot.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
---
fs/yaffs2/Makefile | 2 +-
fs/yaffs2/stdio.h | 1 -
fs/yaffs2/stdlib.h | 1 -
fs/yaffs2/string.h | 4 ---
fs/yaffs2/yaffs_hweight.c | 52 ---------------------------------------------
fs/yaffs2/yaffs_hweight.h | 24 --------------------
fs/yaffs2/yaffs_mtdif2.c | 3 --
fs/yaffs2/yaffsfs.c | 2 -
fs/yaffs2/ydirectenv.h | 16 +++----------
fs/yaffs2/yportenv.h | 1 +
10 files changed, 6 insertions(+), 100 deletions(-)
delete mode 100644 fs/yaffs2/stdio.h
delete mode 100644 fs/yaffs2/stdlib.h
delete mode 100644 fs/yaffs2/string.h
delete mode 100644 fs/yaffs2/yaffs_hweight.c
delete mode 100644 fs/yaffs2/yaffs_hweight.h
diff --git a/fs/yaffs2/Makefile b/fs/yaffs2/Makefile
index 31c12af..9b29d22 100644
--- a/fs/yaffs2/Makefile
+++ b/fs/yaffs2/Makefile
@@ -23,7 +23,7 @@ LIB = $(obj)libyaffs2.o
COBJS-$(CONFIG_YAFFS2) := \
yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\
yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \
- yaffsfs.o yaffs_guts.o yaffs_hweight.o yaffs_nameval.o yaffs_nand.o\
+ yaffsfs.o yaffs_guts.o yaffs_nameval.o yaffs_nand.o\
yaffs_packedtags1.o yaffs_packedtags2.o yaffs_qsort.o \
yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \
yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o
diff --git a/fs/yaffs2/stdio.h b/fs/yaffs2/stdio.h
deleted file mode 100644
index 9f379d7..0000000
--- a/fs/yaffs2/stdio.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Dummy header for u-boot */
diff --git a/fs/yaffs2/stdlib.h b/fs/yaffs2/stdlib.h
deleted file mode 100644
index 9f379d7..0000000
--- a/fs/yaffs2/stdlib.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Dummy header for u-boot */
diff --git a/fs/yaffs2/string.h b/fs/yaffs2/string.h
deleted file mode 100644
index 6501fa7..0000000
--- a/fs/yaffs2/string.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <linux/stddef.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <common.h>
diff --git a/fs/yaffs2/yaffs_hweight.c b/fs/yaffs2/yaffs_hweight.c
deleted file mode 100644
index d96773e..0000000
--- 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 <charles@aleph1.co.uk>
- *
- * 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);
-}
diff --git a/fs/yaffs2/yaffs_hweight.h b/fs/yaffs2/yaffs_hweight.h
deleted file mode 100644
index 3f7c6c3..0000000
--- a/fs/yaffs2/yaffs_hweight.h
+++ /dev/null
@@ -1,24 +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 <charles@aleph1.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
- *
- * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
- */
-
-#ifndef __YAFFS_HWEIGHT_H__
-#define __YAFFS_HWEIGHT_H__
-
-#include "yportenv.h"
-
-int yaffs_hweight8(u8 x);
-int yaffs_hweight32(u32 x);
-
-#endif
diff --git a/fs/yaffs2/yaffs_mtdif2.c b/fs/yaffs2/yaffs_mtdif2.c
index b27fe56..8135bcc 100644
--- a/fs/yaffs2/yaffs_mtdif2.c
+++ b/fs/yaffs2/yaffs_mtdif2.c
@@ -28,7 +28,6 @@
#include "yaffs_trace.h"
#include "yaffs_packedtags2.h"
-#include "string.h"
#define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context))
#define yaffs_dev_to_lc(dev) ((struct yaffs_linux_context *)((dev)->os_context))
@@ -46,9 +45,7 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
struct mtd_oob_ops ops;
int retval = 0;
-
loff_t addr;
- u8 local_spare[128];
struct yaffs_packed_tags2 pt;
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index 9f1397b..ac4a010 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -17,8 +17,6 @@
#include "yportenv.h"
#include "yaffs_trace.h"
-#include "string.h"
-
#define YAFFSFS_MAX_SYMLINK_DEREFERENCES 5
#ifndef NULL
diff --git a/fs/yaffs2/ydirectenv.h b/fs/yaffs2/ydirectenv.h
index df0b8fb..c912b09 100644
--- a/fs/yaffs2/ydirectenv.h
+++ b/fs/yaffs2/ydirectenv.h
@@ -20,15 +20,14 @@
#ifndef __YDIRECTENV_H__
#define __YDIRECTENV_H__
-#include "stdlib.h"
-#include "stdio.h"
-#include "string.h"
+#include <common.h>
+#include <malloc.h>
+#include <linux/compat.h>
+
#include "yaffs_osglue.h"
-#include "yaffs_hweight.h"
void yaffs_bug_fn(const char *file_name, int line_no);
-#define BUG() do { yaffs_bug_fn(__FILE__, __LINE__); } while (0)
#define YCHAR char
@@ -47,8 +46,6 @@ void yaffs_bug_fn(const char *file_name, int line_no);
#define yaffs_strncmp(a, b, c) strncmp(a, b, c)
#endif
-#define hweight8(x) yaffs_hweight8(x)
-#define hweight32(x) yaffs_hweight32(x)
void yaffs_qsort(void *aa, size_t n, size_t es,
int (*cmp)(const void *, const void *));
@@ -63,11 +60,6 @@ void yaffs_qsort(void *aa, size_t n, size_t es,
#define inline __inline__
#endif
-#define kmalloc(x, flags) yaffsfs_malloc(x)
-#define kfree(x) yaffsfs_free(x)
-#define vmalloc(x) yaffsfs_malloc(x)
-#define vfree(x) yaffsfs_free(x)
-
#define cond_resched() do {} while (0)
#define yaffs_trace(msk, fmt, ...) do { \
diff --git a/fs/yaffs2/yportenv.h b/fs/yaffs2/yportenv.h
index b47a4d6..251eba0 100644
--- a/fs/yaffs2/yportenv.h
+++ b/fs/yaffs2/yportenv.h
@@ -17,6 +17,7 @@
#ifndef __YPORTENV_H__
#define __YPORTENV_H__
+#include <linux/types.h>
/* Definition of types */
#ifdef CONFIG_YAFFS_DEFINES_TYPES
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings
2012-08-15 4:26 [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings Charles Manning
@ 2012-09-02 14:47 ` Wolfgang Denk
2012-10-03 21:01 ` Marek Vasut
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2012-09-02 14:47 UTC (permalink / raw)
To: u-boot
Dear Charles Manning,
In message <1345004770-6929-1-git-send-email-cdhmanning@gmail.com> you wrote:
> Also remove yaffs_hweight and use the hweight in u-boot.
>
> Signed-off-by: Charles Manning <cdhmanning@gmail.com>
> ---
> fs/yaffs2/Makefile | 2 +-
> fs/yaffs2/stdio.h | 1 -
> fs/yaffs2/stdlib.h | 1 -
> fs/yaffs2/string.h | 4 ---
> fs/yaffs2/yaffs_hweight.c | 52 ---------------------------------------------
> fs/yaffs2/yaffs_hweight.h | 24 --------------------
> fs/yaffs2/yaffs_mtdif2.c | 3 --
> fs/yaffs2/yaffsfs.c | 2 -
> fs/yaffs2/ydirectenv.h | 16 +++----------
> fs/yaffs2/yportenv.h | 1 +
> 10 files changed, 6 insertions(+), 100 deletions(-)
> delete mode 100644 fs/yaffs2/stdio.h
> delete mode 100644 fs/yaffs2/stdlib.h
> delete mode 100644 fs/yaffs2/string.h
> delete mode 100644 fs/yaffs2/yaffs_hweight.c
> delete mode 100644 fs/yaffs2/yaffs_hweight.h
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Include the success of others in your dreams for your own success.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings
2012-08-15 4:26 [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings Charles Manning
2012-09-02 14:47 ` Wolfgang Denk
@ 2012-10-03 21:01 ` Marek Vasut
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2012-10-03 21:01 UTC (permalink / raw)
To: u-boot
Dear Charles Manning,
> Also remove yaffs_hweight and use the hweight in u-boot.
>
> Signed-off-by: Charles Manning <cdhmanning@gmail.com>
we still get these ... can you submit a patch please?
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used [-Wunused-but-
set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used [-
Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not used [-
Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used [-
Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used [-Wunused-but-
set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used [-Wunused-
but-set-variable]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-03 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 4:26 [U-Boot] [PATCH] u-boot yaffs2: Fix compilation warnings Charles Manning
2012-09-02 14:47 ` Wolfgang Denk
2012-10-03 21:01 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox