From da9b86ec0fbec0eb60646e7a3c700076a423717d Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 15 Mar 2019 10:14:50 +0100 Subject: pstore: Replace arguments for write() API Similar to the pstore_info read() callback, there were too many arguments. This switches to the new struct pstore_record pointer instead. This adds "reason" and "part" to the record structure as well. Signed-off-by: Kees Cook Signed-off-by: Sascha Hauer --- fs/pstore/platform.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'fs') diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 54fe60bf88..755363c309 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -115,14 +115,12 @@ static void pstore_register_console(void) static void pstore_register_console(void) {} #endif -static int pstore_write_compat(enum pstore_type_id type, - enum kmsg_dump_reason reason, - u64 *id, unsigned int part, int count, - bool compressed, size_t size, - struct pstore_info *psi) +static int pstore_write_compat(struct pstore_record *record) { - return psi->write_buf(type, reason, id, part, psinfo->buf, compressed, - size, psi); + return record->psi->write_buf(record->type, record->reason, + &record->id, record->part, + psinfo->buf, record->compressed, + record->size, record->psi); } /* -- cgit v1.2.3