pstore/ram: Refactor DT size parsing
authorKees Cook <keescook@chromium.org>
Wed, 6 May 2020 18:44:14 +0000 (11:44 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 30 May 2020 17:34:02 +0000 (10:34 -0700)
commit26961d76ff35aecb1af0fefd283fb5170786a812
tree254e7b8cd11627877e114e937dcfcaa60fd382b2
parentf858b57f7dd28b5bb55e9dc3776fff58f38a7c91
pstore/ram: Refactor DT size parsing

Refactor device tree size parsing routines to be able to pass a non-zero
default value for providing a configurable default for the coming
"max_reason" field. Also rename the helpers, since we're not always
parsing a size -- we're parsing a u32 and making sure it's not greater
than INT_MAX.

Link: https://lore.kernel.org/lkml/20200506211523.15077-4-keescook@chromium.org/
Link: https://lore.kernel.org/lkml/20200521205223.175957-1-tyhicks@linux.microsoft.com
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c