kernel_optimize_test/fs/pstore
Arnd Bergmann e264abeaf9 pstore: Remove bogus format string definition
The pstore conversion to timespec64 introduces its own method of passing
seconds into sscanf() and sprintf() type functions to work around the
timespec64 definition on 64-bit systems that redefine it to 'timespec'.

That hack is now finally getting removed, but that means we get a (harmless)
warning once both patches are merged:

fs/pstore/ram.c: In function 'ramoops_read_kmsg_hdr':
fs/pstore/ram.c:39:29: error: format '%ld' expects argument of type 'long int *', but argument 3 has type 'time64_t *' {aka 'long long int *'} [-Werror=format=]
 #define RAMOOPS_KERNMSG_HDR "===="
                             ^~~~~~
fs/pstore/ram.c:167:21: note: in expansion of macro 'RAMOOPS_KERNMSG_HDR'

This removes the pstore specific workaround and uses the same method that
we have in place for all other functions that print a timespec64.

Related to this, I found that the kasprintf() output contains an incorrect
nanosecond values for any number starting with zeroes, and I adapt the
format string accordingly.

Link: https://lkml.org/lkml/2018/5/19/115
Link: https://lkml.org/lkml/2018/5/16/1080
Fixes: 0f0d83b99ef7 ("pstore: Convert internal records to timespec64")
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-06-14 14:57:24 +02:00
..
ftrace.c pstore: Remove write_buf() callback 2017-03-07 14:01:02 -08:00
inode.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
internal.h pstore: Select compression at runtime 2018-03-07 12:43:35 -08:00
Kconfig pstore: fix crypto dependencies 2018-03-15 10:06:06 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platform.c pstore: Convert internal records to timespec64 2018-06-05 16:57:31 -07:00
pmsg.c pstore: Create common record initializer 2017-05-31 10:13:44 -07:00
ram_core.c pstore/ram: Do not use stack VLA for parity workspace 2018-03-07 12:47:06 -08:00
ram.c pstore: Remove bogus format string definition 2018-06-14 14:57:24 +02:00