summaryrefslogtreecommitdiff
path: root/fs/pstore/ftrace.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-05 11:27:54 +0300
committerKees Cook <keescook@chromium.org>2017-03-08 01:01:01 +0300
commitb10b471145f28c219d9ddcc309a67e053776865a (patch)
tree9c59af1b2a6ef23b7fd36dbdc1a99b56d47d45f2 /fs/pstore/ftrace.c
parenta61072aae693ba08390f92eed1dd0573fa5c3cd9 (diff)
downloadlinux-b10b471145f28c219d9ddcc309a67e053776865a.tar.xz
pstore: Replace arguments for write_buf() API
As with the other API updates, this removes the long argument list in favor of passing a single pstore recaord. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/ftrace.c')
-rw-r--r--fs/pstore/ftrace.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/pstore/ftrace.c b/fs/pstore/ftrace.c
index 899d0ba0bd6c..a5506ec6995e 100644
--- a/fs/pstore/ftrace.c
+++ b/fs/pstore/ftrace.c
@@ -37,6 +37,12 @@ static void notrace pstore_ftrace_call(unsigned long ip,
{
unsigned long flags;
struct pstore_ftrace_record rec = {};
+ struct pstore_record record = {
+ .type = PSTORE_TYPE_FTRACE,
+ .buf = (char *)&rec,
+ .size = sizeof(rec),
+ .psi = psinfo,
+ };
if (unlikely(oops_in_progress))
return;
@@ -47,8 +53,7 @@ static void notrace pstore_ftrace_call(unsigned long ip,
rec.parent_ip = parent_ip;
pstore_ftrace_write_timestamp(&rec, pstore_ftrace_stamp++);
pstore_ftrace_encode_cpu(&rec, raw_smp_processor_id());
- psinfo->write_buf(PSTORE_TYPE_FTRACE, 0, NULL, 0, (void *)&rec,
- 0, sizeof(rec), psinfo);
+ psinfo->write_buf(&record);
local_irq_restore(flags);
}