summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-19 19:02:27 +0300
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-19 19:02:27 +0300
commit9efabc84768ee8e79b50ad6ad6cff94d66da01f7 (patch)
tree35e54787ab6708116627dfbd74baa007947c5b4b /drivers/mtd
parent93ee7a9340d64f20295aacc3fb6a22b759323280 (diff)
downloadop-kernel-dev-9efabc84768ee8e79b50ad6ad6cff94d66da01f7.zip
op-kernel-dev-9efabc84768ee8e79b50ad6ad6cff94d66da01f7.tar.gz
UBI: do not link debug messages when debugging is disabled
Michal Marek spotted the same issue in UBIFS and this patch fixes UBI, see "UBIFS: not build debug messages with CONFIG_UBIFS_FS_DEBUG disabled" When UBI debugging is disabled, we have debugging messages defined as: if (0) pr_debug() But pr_debug macro defines data structures with debugging data and makes the linux binary larger, even though we have "if (0)". Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/debug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 65b5b76..64fbb00 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -181,7 +181,7 @@ static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi)
#define ubi_dbg_msg(fmt, ...) do { \
if (0) \
- pr_debug(fmt "\n", ##__VA_ARGS__); \
+ printk(KERN_DEBUG fmt "\n", ##__VA_ARGS__); \
} while (0)
#define dbg_msg(fmt, ...) ubi_dbg_msg(fmt, ##__VA_ARGS__)
OpenPOWER on IntegriCloud