Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5687031rwb; Tue, 9 Aug 2022 02:18:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR70CRxyHrHUbRvMi/uWq7skGrGR00ayzSge6GZPeKWkqoeEC1JwFUz5peqNzfO8RaqQAd6y X-Received: by 2002:a05:6402:d5d:b0:441:c3f8:cf96 with SMTP id ec29-20020a0564020d5d00b00441c3f8cf96mr849025edb.238.1660036698696; Tue, 09 Aug 2022 02:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660036698; cv=none; d=google.com; s=arc-20160816; b=Ew9V9qa78B//gGpgYGw5UMG4Up1XZS3cHQ6iAiaFk6S9J3ruxm9ksOjVPthc8horsT Sv3cNA57LBNaO0M6jEKvlfb7GSEmbECHTxMruN2OU+9SwafAKzbkUYWgPGwpSm2Wp4uy UZOg4196t8Uf1kwdRBYQqS6F0YrES6DJHJmdvuOHVb8SErXwjMtDHnl4ld5NMf75z4gl vahcHbTXfGwMcBuVoI3YJPa3u8VD+dvN+ZUx8in938Yaq4pEoBPqKyb5lOuNh/nbCLhi HS+Q5QWNKL006GnlnwPusV2JBv5Pf2i8etUjVU/cZdH/5EJlVmjZVh6BtCGLYZsOMupV N/Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=X5bXw+KJz7s6JbVNKPyDjsczL/IzkwowkwZc4MRRlhI=; b=QmXTYjc3Ej801I1TuD5QikcsiZlMsVq0j/Ak5/fVyuRlne44q41FhM3LXICl+6nnrW +jvnRYW7uMIn1P1y7yd3TQbSSIc66Hnpx50lkRPBfpJ1ndf6arhxfWi2rJELDBcpplFG 96at5OlcA6pEDFdLHg7IrOZgN7vV5gxy/bh1kx0t8ulC5JJtfW31urrJ/SxdQYoCv8j3 Ptf+8ZEOB5Ehd8jGP3F2Mhr+teVsap6p1vClLySyl6IrJZsyrlaoeehjSexi13RxL9nn 4M/iAr2NVBKxYPcEMkGZR32lA4pGfjGWeoGoi5GJIaAkmTmZXJzjJFCYtwFj9K/f/H5F gK5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d29-20020a50cd5d000000b0043bdf9b0ff5si8548548edj.443.2022.08.09.02.17.44; Tue, 09 Aug 2022 02:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234144AbiHIJO7 (ORCPT + 99 others); Tue, 9 Aug 2022 05:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiHIJO7 (ORCPT ); Tue, 9 Aug 2022 05:14:59 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2AFCF21E1D; Tue, 9 Aug 2022 02:14:58 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id CDA5F1E80CD2; Tue, 9 Aug 2022 17:13:12 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hf1it-2oo_4A; Tue, 9 Aug 2022 17:13:10 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: chuanjian@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 2B1501E80CC5; Tue, 9 Aug 2022 17:13:10 +0800 (CST) From: Dong Chuanjian To: herbert@gondor.apana.org.au, davem@davemloft.net Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@nfschina.com, Dong Chuanjian Subject: [PATCH] crypto/drbg.c:remove unnecessary (void*) conversions Date: Tue, 9 Aug 2022 17:14:52 +0800 Message-Id: <20220809091452.5264-1-chuanjian@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org remove unnecessary void* type casting Signed-off-by: Dong Chuanjian diff --git a/crypto/drbg.c b/crypto/drbg.c index 177983b6ae38..f41ec3088ecc 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1703,7 +1703,7 @@ static int drbg_init_hash_kernel(struct drbg_state *drbg) static int drbg_fini_hash_kernel(struct drbg_state *drbg) { - struct sdesc *sdesc = (struct sdesc *)drbg->priv_data; + struct sdesc *sdesc = drbg->priv_data; if (sdesc) { crypto_free_shash(sdesc->shash.tfm); kfree_sensitive(sdesc); @@ -1715,7 +1715,7 @@ static int drbg_fini_hash_kernel(struct drbg_state *drbg) static void drbg_kcapi_hmacsetkey(struct drbg_state *drbg, const unsigned char *key) { - struct sdesc *sdesc = (struct sdesc *)drbg->priv_data; + struct sdesc *sdesc = drbg->priv_data; crypto_shash_setkey(sdesc->shash.tfm, key, drbg_statelen(drbg)); } @@ -1723,7 +1723,7 @@ static void drbg_kcapi_hmacsetkey(struct drbg_state *drbg, static int drbg_kcapi_hash(struct drbg_state *drbg, unsigned char *outval, const struct list_head *in) { - struct sdesc *sdesc = (struct sdesc *)drbg->priv_data; + struct sdesc *sdesc = drbg->priv_data; struct drbg_string *input = NULL; crypto_shash_init(&sdesc->shash); @@ -1819,7 +1819,7 @@ static void drbg_kcapi_symsetkey(struct drbg_state *drbg, const unsigned char *key) { struct crypto_cipher *tfm = - (struct crypto_cipher *)drbg->priv_data; + drbg->priv_data; crypto_cipher_setkey(tfm, key, (drbg_keylen(drbg))); } @@ -1828,7 +1828,7 @@ static int drbg_kcapi_sym(struct drbg_state *drbg, unsigned char *outval, const struct drbg_string *in) { struct crypto_cipher *tfm = - (struct crypto_cipher *)drbg->priv_data; + drbg->priv_data; /* there is only component in *in */ BUG_ON(in->len < drbg_blocklen(drbg)); -- 2.18.2