diff mbox series

crypto: remove unneeded semicolon

Message ID 20191216105848.10669-1-chenzhou10@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: remove unneeded semicolon | expand

Commit Message

chenzhou Dec. 16, 2019, 10:58 a.m. UTC
Fixes coccicheck warning:

./include/linux/crypto.h:573:2-3: Unneeded semicolon

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 include/linux/crypto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Biggers Dec. 16, 2019, 6:43 p.m. UTC | #1
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@huawei.com>
> ---
>  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;
}
Herbert Xu Dec. 27, 2019, 10:36 a.m. UTC | #2
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@huawei.com>
> ---
>  include/linux/crypto.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

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;
 }