From patchwork Thu Apr 23 10:12:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firo Yang X-Patchwork-Id: 6261411 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CB6FBF4A6 for ; Thu, 23 Apr 2015 10:12:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51BF320377 for ; Thu, 23 Apr 2015 10:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6537A2026C for ; Thu, 23 Apr 2015 10:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933135AbbDWKMO (ORCPT ); Thu, 23 Apr 2015 06:12:14 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34785 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932168AbbDWKMM (ORCPT ); Thu, 23 Apr 2015 06:12:12 -0400 Received: by pablf10 with SMTP id lf10so4665740pab.1; Thu, 23 Apr 2015 03:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qc9OQqd9xwrfuHLoY6JpOSmJJcuo/39p4hM0bKy/f5s=; b=GT+PQUeql2Rwrqf4CAN9emCFNUaSVT4oQ/62h2WtQWG9zcXrkWWVEhaKNC51SFeIpm t2KcNLvLlZ7VfaZvZRIVkQjoSvk1Xtcr3cyr60Bh/2Uuf7iWsI2FUQ03xOe2QWD4jQOD YBGmygdIltnR9bYrd1FGCYEypjcVmGUeGNCeVGY7dN8TWiCGwjlCSbkQfm6iNpIkplRk 9Y11T69t86dS55iBgECAK6WxY7YxrsCuZc3eGGt0CKO6yS5qaPDI0b1keYC5E+t0u/E1 PqFmNPqX4e83piqfI4nbDh9JST+AIfK/0CKpSzpZPquJjkJRwrKWXgs8mBxa4XF89PtT GMBQ== X-Received: by 10.67.6.42 with SMTP id cr10mr881609pad.11.1429783932270; Thu, 23 Apr 2015 03:12:12 -0700 (PDT) Received: from localhost (138.128.195.217.16clouds.com. [138.128.195.217]) by mx.google.com with ESMTPSA id eh4sm7575247pbd.69.2015.04.23.03.12.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 03:12:11 -0700 (PDT) From: Firo Yang To: herbert@gondor.apana.org.au Cc: kernel-janitors@vger.kernel.org, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tim.c.chen@linux.intel.com, smueller@chronox.de, minipli@googlemail.com, dan.carpenter@oracle.com, ameenali023@gmail.com, fengguang.wu@intel.com, linux-crypto@vger.kernel.org, Firo Yang Subject: [PATCH] crypto: sha1-mb - Remove pointless cast Date: Thu, 23 Apr 2015 18:12:10 +0800 Message-Id: <1429783930-7318-1-git-send-email-firogm@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);