On Tue, Jan 22, 2019 at 3:10 AM Yue Hu <huy...@yulong.com> wrote:
>
> From 7123b8bfaede56796fb21767cc8c13496d9c44e6 Mon Sep 17 00:00:00 2001
> From: Yue Hu <huy...@yulong.com>
> Date: Tue, 22 Jan 2019 18:51:48 +0800
> Subject: [PATCH] pstore: Fix some style warnings and errors
>
> WARNING: line over 80 characters
> +#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || 
> IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
>
> WARNING: line over 80 characters
> +#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || 
> IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
>
> ERROR: "foo __init      bar" should be "foo __init bar"
> +int __init     pstore_init_fs(void);
>
> ERROR: "foo __exit      bar" should be "foo __exit bar"
> +void __exit    pstore_exit_fs(void);
>
> Signed-off-by: Yue Hu <huy...@yulong.com>
> ---
>  fs/pstore/internal.h | 4 ++--
>  fs/pstore/platform.c | 6 ++++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h
> index 7062ea4..6b4fad0 100644
> --- a/fs/pstore/internal.h
> +++ b/fs/pstore/internal.h
> @@ -38,7 +38,7 @@ extern void   pstore_record_init(struct pstore_record 
> *record,
>                                    struct pstore_info *psi);
>
>  /* Called during pstore init/exit. */
> -int __init     pstore_init_fs(void);
> -void __exit    pstore_exit_fs(void);
> +int __init pstore_init_fs(void);
> +void __exit pstore_exit_fs(void);

These are intentionally indented to match the function declarations above them.

>
>  #endif
> diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
> index 2d1066e..0ca7657 100644
> --- a/fs/pstore/platform.c
> +++ b/fs/pstore/platform.c
> @@ -31,7 +31,8 @@
>  #if IS_ENABLED(CONFIG_PSTORE_LZO_COMPRESS)
>  #include <linux/lzo.h>
>  #endif
> -#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || 
> IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
> +#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || \
> +       IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
>  #include <linux/lz4.h>
>  #endif
>  #if IS_ENABLED(CONFIG_PSTORE_ZSTD_COMPRESS)
> @@ -219,7 +220,8 @@ static int zbufsize_lzo(size_t size)
>  }
>  #endif
>
> -#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || 
> IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
> +#if IS_ENABLED(CONFIG_PSTORE_LZ4_COMPRESS) || \
> +       IS_ENABLED(CONFIG_PSTORE_LZ4HC_COMPRESS)
>  static int zbufsize_lz4(size_t size)
>  {
>         return LZ4_compressBound(size);

My hope is to remove the per-compression logic in the near future once
the general compression API gains the "size" API, so I'd like to avoid
churn here for the moment.

-Kees

-- 
Kees Cook

Reply via email to