summaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/platform.c32
-rw-r--r--fs/pstore/ram.c9
2 files changed, 7 insertions, 34 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 15c0174b1f..f4b77226d9 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -46,35 +46,6 @@ void pstore_set_kmsg_bytes(int bytes)
static int pstore_ready;
-static void pstore_console_write(const char *s, unsigned c)
-{
- const char *e = s + c;
-
- while (s < e) {
- struct pstore_record record = {
- .type = PSTORE_TYPE_CONSOLE,
- .psi = psinfo,
- };
-
- if (c > psinfo->bufsize)
- c = psinfo->bufsize;
-
- record.buf = (char *)s;
- record.size = c;
- psinfo->write_buf(PSTORE_TYPE_CONSOLE, 0, &record.id, 0,
- record.buf, 0, record.size, psinfo);
- s += c;
- c = e - s;
- }
-}
-
-static int pstore_console_puts(struct console_device *cdev, const char *s,
- size_t nbytes)
-{
- pstore_console_write(s, nbytes);
- return nbytes;
-}
-
void pstore_log(const char *str)
{
uint64_t id;
@@ -102,6 +73,9 @@ static void pstore_console_capture_log(void)
uint64_t id;
struct log_entry *log, *tmp;
+ if (IS_ENABLED(CONFIG_CONSOLE_NONE))
+ return;
+
list_for_each_entry_safe(log, tmp, &barebox_logbuf, list) {
psinfo->write_buf(PSTORE_TYPE_CONSOLE, 0, &id, 0,
log->msg, 0, strlen(log->msg), psinfo);
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 86049f989e..958f46b0ea 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -623,10 +623,10 @@ static int ramoops_probe(struct device_d *dev)
if (!IS_ENABLED(CONFIG_OFTREE)) {
scnprintf(kernelargs, sizeof(kernelargs),
- "ramoops.record_size=0x%x "
- "ramoops.console_size=0x%x "
- "ramoops.ftrace_size=0x%x "
- "ramoops.pmsg_size=0x%x "
+ "ramoops.record_size=0x%zx "
+ "ramoops.console_size=0x%zx "
+ "ramoops.ftrace_size=0x%zx "
+ "ramoops.pmsg_size=0x%zx "
"ramoops.mem_address=0x%llx "
"ramoops.mem_size=0x%lx "
"ramoops.ecc=%d",
@@ -646,7 +646,6 @@ static int ramoops_probe(struct device_d *dev)
return 0;
fail_buf:
-fail_clear:
kfree(cxt->mprz);
fail_init_mprz:
kfree(cxt->fprz);