[U-Boot] [PATCH] ubifs: Add missing macros for U-boot build
Kevin Smith
kevin.smith at elecsyscorp.com
Tue Sep 22 17:15:29 CEST 2015
A few debug function calls that should be macro'd out in the
U-Boot build were still in. They are impossible to reach, as
they are in an "if (0)" block. The optimizer figures this
out, so the build succeeds with -O2. However, with -O0, the
symbols remain and the link fails, because the definitions are
macro'd out. This patch macros out the calls so that the build
succeeds with -O0.
Signed-off-by: Kevin Smith <kevin.smith at elecsyscorp.com>
---
fs/ubifs/io.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index bdccdc4..eab3281 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -118,8 +118,10 @@ int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs,
return -EROFS;
if (!dbg_is_tst_rcvry(c))
err = ubi_leb_write(c->ubi, lnum, buf, offs, len);
+#ifndef __UBOOT__
else
err = dbg_leb_write(c, lnum, buf, offs, len);
+#endif
if (err) {
ubifs_err("writing %d bytes to LEB %d:%d failed, error %d",
len, lnum, offs, err);
@@ -138,8 +140,10 @@ int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len)
return -EROFS;
if (!dbg_is_tst_rcvry(c))
err = ubi_leb_change(c->ubi, lnum, buf, len);
+#ifndef __UBOOT__
else
err = dbg_leb_change(c, lnum, buf, len);
+#endif
if (err) {
ubifs_err("changing %d bytes in LEB %d failed, error %d",
len, lnum, err);
@@ -158,8 +162,10 @@ int ubifs_leb_unmap(struct ubifs_info *c, int lnum)
return -EROFS;
if (!dbg_is_tst_rcvry(c))
err = ubi_leb_unmap(c->ubi, lnum);
+#ifndef __UBOOT__
else
err = dbg_leb_unmap(c, lnum);
+#endif
if (err) {
ubifs_err("unmap LEB %d failed, error %d", lnum, err);
ubifs_ro_mode(c, err);
@@ -177,8 +183,10 @@ int ubifs_leb_map(struct ubifs_info *c, int lnum)
return -EROFS;
if (!dbg_is_tst_rcvry(c))
err = ubi_leb_map(c->ubi, lnum);
+#ifndef __UBOOT__
else
err = dbg_leb_map(c, lnum);
+#endif
if (err) {
ubifs_err("mapping LEB %d failed, error %d", lnum, err);
ubifs_ro_mode(c, err);
--
2.4.6
More information about the U-Boot
mailing list