All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ubifs: Add missing macros for U-boot build
@ 2015-09-22 15:15 Kevin Smith
  0 siblings, 0 replies; only message in thread
From: Kevin Smith @ 2015-09-22 15:15 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-22 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-22 15:15 [U-Boot] [PATCH] ubifs: Add missing macros for U-boot build Kevin Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.