[PATCH] staging: skein: fix code indentation

Daniel Baluta daniel.baluta at gmail.com
Tue Sep 16 20:54:01 EEST 2014


On Tue, Sep 16, 2014 at 8:38 PM, Roxana Blaj <roxanagabriela10 at gmail.com> wrote:
> This fixes the warning
> WARNING: suspect code indent for conditional statements (16, 16)
>
> Signed-off-by: Roxana Blaj <roxanagabriela10 at gmail.com>
> ---
>  drivers/staging/skein/skein_block.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
> index 616364f..e9bf1af 100644
> --- a/drivers/staging/skein/skein_block.c
> +++ b/drivers/staging/skein/skein_block.c
> @@ -378,9 +378,8 @@ do { \
>         skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
>  } while (0)
>
> -               for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_512)
>  #endif /* end of looped code definitions */
> -               {
> +               for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_512) {

This code is very strange and I don't understand it. I'm sure that
this patch is not correct.
The initial code looks like:

#ifdef CONDITION

#else
for ()....
#endif

With your new code the for statement is executed unconditionally.

Daniel.


More information about the firefly mailing list