diff mbox

[U-Boot] YAFFS2: Fix compiler errors preventing successful build

Message ID 1344975382-28609-1-git-send-email-marex@denx.de
State Superseded
Headers show

Commit Message

Marek Vasut Aug. 14, 2012, 8:16 p.m. UTC
These warnings still persist:

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]
yaffs_mtdif2.c: In function ‘nandmtd2_write_chunk_tags’:
yaffs_mtdif2.c:51:5: warning: unused variable ‘local_spare’ [-Wunused-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Charles Manning <cdhmanning@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
---
 fs/yaffs2/ydirectenv.h |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Charles Manning Aug. 15, 2012, 4:23 a.m. UTC | #1
On Wednesday 15 August 2012 08:16:22 Marek Vasut wrote:

>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Charles Manning <cdhmanning@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>


While I appreciate this, I would prefer the use the patch I submitted today 
which also gets rid of the yaffs hweight code too.

-- CHarles
Marek Vasut Aug. 15, 2012, 11:55 a.m. UTC | #2
Dear Charles Manning,

> On Wednesday 15 August 2012 08:16:22 Marek Vasut wrote:
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Charles Manning <cdhmanning@gmail.com>
> > Cc: Wolfgang Denk <wd@denx.de>
> 
> While I appreciate this, I would prefer the use the patch I submitted today
> which also gets rid of the yaffs hweight code too.

Thanks Charles ... I'll review it in a bit.

> -- CHarles

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/fs/yaffs2/ydirectenv.h b/fs/yaffs2/ydirectenv.h
index df0b8fb..85538ad 100644
--- a/fs/yaffs2/ydirectenv.h
+++ b/fs/yaffs2/ydirectenv.h
@@ -26,10 +26,12 @@ 
 #include "yaffs_osglue.h"
 #include "yaffs_hweight.h"
 
-void yaffs_bug_fn(const char *file_name, int line_no);
+#include <malloc.h>
+#include <linux/compat.h>
 
-#define BUG() do { yaffs_bug_fn(__FILE__, __LINE__); } while (0)
+void yaffs_bug_fn(const char *file_name, int line_no);
 
+#define GFP_NOFS	1
 
 #define YCHAR char
 #define YUCHAR unsigned char
@@ -47,8 +49,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 +63,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 { \