summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-08 12:48:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-07-09 10:54:43 +0200
commit5b1bc2224cff7deb2f1e048bb82a60d857f642be (patch)
tree8d9a74078de9c142aabe7ab17901dd614730676d /fs
parent297ac72881b89d34f7940020319fd3e2a68fbe67 (diff)
downloadbarebox-5b1bc2224cff7deb2f1e048bb82a60d857f642be.tar.gz
pstore: remove unused code
pstore_info->write() is unused, remove the code implementing it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/platform.c10
-rw-r--r--fs/pstore/ram.c17
2 files changed, 0 insertions, 27 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index aafa555..0a6fa38 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -79,14 +79,6 @@ static void pstore_console_capture_log(void)
}
}
-static int pstore_write_compat(struct pstore_record *record)
-{
- return record->psi->write_buf(record->type, record->reason,
- &record->id, record->part,
- psinfo->buf, record->compressed,
- record->size, record->psi);
-}
-
/*
* platform specific persistent storage driver registers with
* us here. If pstore is already mounted, call the platform
@@ -107,8 +99,6 @@ int pstore_register(struct pstore_info *psi)
return -EBUSY;
}
- if (!psi->write)
- psi->write = pstore_write_compat;
psinfo = psi;
mutex_init(&psinfo->read_mutex);
spin_unlock(&pstore_lock);
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 734d0c3..86049f9 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -609,22 +609,7 @@ static int ramoops_probe(struct device_d *dev)
goto fail_init_mprz;
cxt->pstore.data = cxt;
- /*
- * Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
- * have to handle dumps, we must have at least record_size buffer. And
- * for ftrace, bufsize is irrelevant (if bufsize is 0, buf will be
- * ZERO_SIZE_PTR).
- */
- if (cxt->console_size)
- cxt->pstore.bufsize = 1024; /* LOG_LINE_MAX */
- cxt->pstore.bufsize = max(cxt->record_size, cxt->pstore.bufsize);
- cxt->pstore.buf = kmalloc(cxt->pstore.bufsize, GFP_KERNEL);
spin_lock_init(&cxt->pstore.buf_lock);
- if (!cxt->pstore.buf) {
- pr_err("cannot allocate pstore buffer\n");
- err = -ENOMEM;
- goto fail_clear;
- }
err = pstore_register(&cxt->pstore);
if (err) {
@@ -661,9 +646,7 @@ static int ramoops_probe(struct device_d *dev)
return 0;
fail_buf:
- kfree(cxt->pstore.buf);
fail_clear:
- cxt->pstore.bufsize = 0;
kfree(cxt->mprz);
fail_init_mprz:
kfree(cxt->fprz);