summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/misc.c
diff options
context:
space:
mode:
authorTanya Brokhman <tlinder@codeaurora.org>2016-05-27 09:44:00 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-27 12:30:27 +0200
commit379c86f1afb2a11fd8b47534cf7148cf536c8632 (patch)
tree75a4836ab8779ec1b6fa0c5ca2e4947a963dbe3b /drivers/mtd/ubi/misc.c
parentfbc46098bab8920ae6af9e0fa6c2e3a230b69639 (diff)
downloadbarebox-379c86f1afb2a11fd8b47534cf7148cf536c8632.tar.gz
barebox-379c86f1afb2a11fd8b47534cf7148cf536c8632.tar.xz
UBI: Extend UBI layer debug/messaging capabilities
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Amended a bit by Artem. Signed-off-by: Tanya Brokhman <tlinder@codeaurora.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Conflicts: drivers/mtd/ubi/block.c drivers/mtd/ubi/build.c drivers/mtd/ubi/cdev.c drivers/mtd/ubi/debug.c drivers/mtd/ubi/fastmap.c drivers/mtd/ubi/io.c drivers/mtd/ubi/ubi.h drivers/mtd/ubi/vmt.c drivers/mtd/ubi/wl.c Reworked it for barebox. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi/misc.c')
-rw-r--r--drivers/mtd/ubi/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 963346646d..d9a8d792a4 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -107,7 +107,7 @@ void ubi_update_reserved(struct ubi_device *ubi)
ubi->avail_pebs -= need;
ubi->rsvd_pebs += need;
ubi->beb_rsvd_pebs += need;
- ubi_msg("reserved more %d PEBs for bad PEB handling", need);
+ ubi_msg(ubi, "reserved more %d PEBs for bad PEB handling", need);
}
/**
@@ -124,7 +124,7 @@ void ubi_calculate_reserved(struct ubi_device *ubi)
ubi->beb_rsvd_level = ubi->bad_peb_limit - ubi->bad_peb_count;
if (ubi->beb_rsvd_level < 0) {
ubi->beb_rsvd_level = 0;
- ubi_warn("number of bad PEBs (%d) is above the expected limit (%d), not reserving any PEBs for bad PEB handling, will use available PEBs (if any)",
+ ubi_warn(ubi, "number of bad PEBs (%d) is above the expected limit (%d), not reserving any PEBs for bad PEB handling, will use available PEBs (if any)",
ubi->bad_peb_count, ubi->bad_peb_limit);
}
}