* [PATCH] crypto: n2 - Remove return statement from void function
@ 2016-03-18 13:38 Amitoj Kaur Chawla
2016-04-05 12:46 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2016-03-18 13:38 UTC (permalink / raw)
To: herbert, davem, linux-crypto, linux-kernel; +Cc: julia.lawall
Return statement at the end of a void function is useless.
The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
identifier f;
expression e;
@@
void f(...) {
<...
- return
e;
...>
}
//</smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/crypto/n2_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index b85a7a7..c5aac25 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1598,7 +1598,7 @@ static void *new_queue(unsigned long q_type)
static void free_queue(void *p, unsigned long q_type)
{
- return kmem_cache_free(queue_cache[q_type - 1], p);
+ kmem_cache_free(queue_cache[q_type - 1], p);
}
static int queue_cache_init(void)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: n2 - Remove return statement from void function
2016-03-18 13:38 [PATCH] crypto: n2 - Remove return statement from void function Amitoj Kaur Chawla
@ 2016-04-05 12:46 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2016-04-05 12:46 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: davem, linux-crypto, linux-kernel, julia.lawall
On Fri, Mar 18, 2016 at 07:08:48PM +0530, Amitoj Kaur Chawla wrote:
> Return statement at the end of a void function is useless.
>
> The Coccinelle semantic patch used to make this change is as follows:
> //<smpl>
> @@
> identifier f;
> expression e;
> @@
> void f(...) {
> <...
> - return
> e;
> ...>
> }
> //</smpl>
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-05 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 13:38 [PATCH] crypto: n2 - Remove return statement from void function Amitoj Kaur Chawla
2016-04-05 12:46 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).