Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6235073rwb; Tue, 9 Aug 2022 11:24:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR442t+JPZFui6jtqOIbyMCqcK9rrY4Q1U1aLoGC4D4vVfVI11qv64wKXwjBaeQAmtmBqOIN X-Received: by 2002:a17:907:6285:b0:72f:a3b9:9666 with SMTP id nd5-20020a170907628500b0072fa3b99666mr17190175ejc.455.1660069488812; Tue, 09 Aug 2022 11:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660069488; cv=none; d=google.com; s=arc-20160816; b=VaokgYmea9HyVDqFxuHicbacL/MCHTaAjlL861H6qiV7WVAtYmHgCA1gyJXdXZJrA7 MG90hdC04ytrmMGUlAii1kibxPqF5jtEVuHP4eCQK1c4Dqdvq16rdQVUIYpbQMa7/yNG YRuI/qbafKwZpH/HIscnqJT+8jihmM0MZhHlDdqsTtCjUqfQl5H5KiZRGGiWzw+z9Fkp 5O/oPJEGwng4JN7FlMXqQE+AF/ZmCDHCRvJM40D7DHbXB6yKuQNXrCuSmbP/Z/urk0Jt jz/xowCdapMgZgmdKNpinBtIBEFjT7xmc6f7ciiFFCpJ2s2o5rORFklgA33ANTelNoqs 93AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nqYs7CQo0+uDObX18AMsnAspAC6mkzAvGL4B5j6yZow=; b=oTRr4co3N0niTtth0shghSSLyNuNCjS725NwclberFu2Ta933JP6XNcuX+XB1hLGCE 8/UxmgMJSsyqmD9kpf+ZjgqgqjTH72tUEKOoczWwYKHwhmw2XSlMCXjrfWepbhQpzB/u fUJG8QHfKfGMBq1eKedFEFKjWrSK2xjaziX8H264EwXQYusHjahbRWBNZLa2/Pw/tUh5 WVsAtO55E1UK/dsBSE8piSyX5byRLzN/vhjyMbEkWfnS9fxGBWF/fyPloJGZ/uaEx4p0 tU78++GqldQa90La9ZcGmj8bEnZHNf006jwK/2OlTSOHLxg8VLjKrizfTauCd7BYln3+ pmxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZadcVQXJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a1709063fd400b00730bc62507csi2188804ejj.125.2022.08.09.11.24.07; Tue, 09 Aug 2022 11:24:48 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZadcVQXJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245196AbiHISX3 (ORCPT + 99 others); Tue, 9 Aug 2022 14:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346352AbiHISVG (ORCPT ); Tue, 9 Aug 2022 14:21:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7B3D30F71; Tue, 9 Aug 2022 11:07:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 884EFB8191D; Tue, 9 Aug 2022 18:07:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF20EC433D7; Tue, 9 Aug 2022 18:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660068423; bh=mpQMti49pYC6uBbppBC/68xa8KuEYFFq6Y5tSKu+5mk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZadcVQXJ9mw3zLTMpkx8f1L3zlsqF20OvMzoQHigrCCWEy0RaZ3/XCRqLe8ZgSPFu K0X1GkXznnvFdqyMHE3a+y+/5BxyFN9Z6oS+O8ZI9D77335EQN1V6cCQYwcLwn55CP 0LcqDNKId2qi+BY85LS4HTTVke2Tl74g/gvn7eGbJx/woH5axDs844USYZZjggK4uq Vq1jf81XApEo6pHWuUuFgMgLYfc0kDFqdbzQj34XRW9UdAuXm9bi1xvwWZeg4OeMcj dxyl80lTEhEo52EdRYxbIzHiWfQAcGhapk5nuOyIBg5IE8m6QeUyhva6R31mF5fye4 h6TmVJb+ZY7Mw== Date: Tue, 9 Aug 2022 18:07:01 +0000 From: Eric Biggers To: Dong Chuanjian Cc: herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@nfschina.com Subject: Re: [PATCH] crypto/drbg.c:remove unnecessary (void*) conversions Message-ID: References: <20220809091452.5264-1-chuanjian@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809091452.5264-1-chuanjian@nfschina.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Aug 09, 2022 at 05:14:52PM +0800, Dong Chuanjian wrote: > struct crypto_cipher *tfm = > - (struct crypto_cipher *)drbg->priv_data; > + drbg->priv_data; Might as well join this into one line. > > 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; Likewise. - Eric