All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] pstore: Fix some style warnings and errors
       [not found] <5c46fa15.1c69fb81.5733e.9104SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2019-02-12 20:20 ` Kees Cook
  0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2019-02-12 20:20 UTC (permalink / raw)
  To: Yue Hu; +Cc: Anton Vorontsov, Colin Cross, Tony Luck, LKML

On Tue, Jan 22, 2019 at 3:10 AM Yue Hu <huyue2@yulong.com> wrote:
>
> From 7123b8bfaede56796fb21767cc8c13496d9c44e6 Mon Sep 17 00:00:00 2001
> From: Yue Hu <huyue2@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 <huyue2@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-12 20:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5c46fa15.1c69fb81.5733e.9104SMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-12 20:20 ` [PATCH] pstore: Fix some style warnings and errors Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.