android_kernel_motorola_sm6225/fs/pstore
Matteo Croce 3b71aed505 pstore: Fix linking when crypto API disabled
commit fd49e03280e596e54edb93a91bc96170f8e97e4a upstream.

When building a kernel with CONFIG_PSTORE=y and CONFIG_CRYPTO not set,
a build error happens:

    ld: fs/pstore/platform.o: in function `pstore_dump':
    platform.c:(.text+0x3f9): undefined reference to `crypto_comp_compress'
    ld: fs/pstore/platform.o: in function `pstore_get_backend_records':
    platform.c:(.text+0x784): undefined reference to `crypto_comp_decompress'

This because some pstore code uses crypto_comp_(de)compress regardless
of the CONFIG_CRYPTO status. Fix it by wrapping the (de)compress usage
by IS_ENABLED(CONFIG_PSTORE_COMPRESS)

Signed-off-by: Matteo Croce <mcroce@linux.microsoft.com>
Link: https://lore.kernel.org/lkml/20200706234045.9516-1-mcroce@linux.microsoft.com
Fixes: cb3bee0369 ("pstore: Use crypto compress API")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-19 08:15:04 +02:00
..
ftrace.c pstore: Remove write_buf() callback 2017-03-07 14:01:02 -08:00
inode.c pstore: pstore_ftrace_seq_next should increase position index 2020-04-17 10:48:47 +02:00
internal.h pstore: Centralize init/exit routines 2019-05-22 07:37:45 +02:00
Kconfig pstore: add zstd compression support 2018-08-03 18:12:18 -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: Fix linking when crypto API disabled 2020-08-19 08:15:04 +02:00
pmsg.c pstore: Create common record initializer 2017-05-31 10:13:44 -07:00
ram.c pstore/ram: Write new dumps to start of recycled zones 2020-01-09 10:19:00 +01:00
ram_core.c pstore/ram: Do not treat empty buffers as valid 2019-01-26 09:32:37 +01:00