linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: sha1-mb - Remove pointless cast
@ 2015-04-23 10:12 Firo Yang
  2015-04-26  6:50 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Firo Yang @ 2015-04-23 10:12 UTC (permalink / raw)
  To: herbert
  Cc: kernel-janitors, davem, tglx, mingo, hpa, tim.c.chen, smueller,
	minipli, dan.carpenter, ameenali023, fengguang.wu, linux-crypto,
	Firo Yang

Since kzalloc() returns a void pointer, we don't need to cast the
return value in arch/x86/crypto/sha-mb/sha1_mb.c::sha1_mb_mod_init().

Signed-off-by: Firo Yang <firogm@gmail.com>
---
 arch/x86/crypto/sha-mb/sha1_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index e510b1c..0cb5149 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -885,7 +885,8 @@ static int __init sha1_mb_mod_init(void)
 		INIT_DELAYED_WORK(&cpu_state->flush, mcryptd_flusher);
 		cpu_state->cpu = cpu;
 		cpu_state->alg_state = &sha1_mb_alg_state;
-		cpu_state->mgr = (struct sha1_ctx_mgr *) kzalloc(sizeof(struct sha1_ctx_mgr), GFP_KERNEL);
+		cpu_state->mgr = kzalloc(sizeof(struct sha1_ctx_mgr),
+					GFP_KERNEL);
 		if (!cpu_state->mgr)
 			goto err2;
 		sha1_ctx_mgr_init(cpu_state->mgr);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: sha1-mb - Remove pointless cast
  2015-04-23 10:12 [PATCH] crypto: sha1-mb - Remove pointless cast Firo Yang
@ 2015-04-26  6:50 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2015-04-26  6:50 UTC (permalink / raw)
  To: Firo Yang
  Cc: kernel-janitors, davem, tglx, mingo, hpa, tim.c.chen, smueller,
	minipli, dan.carpenter, ameenali023, fengguang.wu, linux-crypto

On Thu, Apr 23, 2015 at 06:12:10PM +0800, Firo Yang wrote:
> Since kzalloc() returns a void pointer, we don't need to cast the
> return value in arch/x86/crypto/sha-mb/sha1_mb.c::sha1_mb_mod_init().
> 
> Signed-off-by: Firo Yang <firogm@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:[~2015-04-26  6:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 10:12 [PATCH] crypto: sha1-mb - Remove pointless cast Firo Yang
2015-04-26  6:50 ` 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).