Re: [PATCH] crypto: remove unneeded semicolon

From: Eric Biggers
Date: Mon Dec 16 2019 - 13:43:48 EST


On Mon, Dec 16, 2019 at 06:58:48PM +0800, Chen Zhou wrote:
> Fixes coccicheck warning:
>
> ./include/linux/crypto.h:573:2-3: Unneeded semicolon
>
> Signed-off-by: Chen Zhou <chenzhou10@xxxxxxxxxx>
> ---
> include/linux/crypto.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/crypto.h b/include/linux/crypto.h
> index 23365a9..5446efe 100644
> --- a/include/linux/crypto.h
> +++ b/include/linux/crypto.h
> @@ -570,7 +570,7 @@ static inline int crypto_wait_req(int err, struct crypto_wait *wait)
> reinit_completion(&wait->completion);
> err = wait->err;
> break;
> - };
> + }
>
> return err;
> }
> --

As long as you're changing this, perhaps also change the 'switch' to an 'if' and
delete the extra blank line? I.e.:

static inline int crypto_wait_req(int err, struct crypto_wait *wait)
{
if (err == -EINPROGRESS || err == -EBUSY) {
wait_for_completion(&wait->completion);
reinit_completion(&wait->completion);
err = wait->err;
}
return err;
}