From patchwork Sun May 20 05:07:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10413085 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3C15600F6 for ; Sun, 20 May 2018 05:07:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B484F2847A for ; Sun, 20 May 2018 05:07:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A92FB286FD; Sun, 20 May 2018 05:07:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B0082847A for ; Sun, 20 May 2018 05:07:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750932AbeETFHA (ORCPT ); Sun, 20 May 2018 01:07:00 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:33740 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbeETFG7 (ORCPT ); Sun, 20 May 2018 01:06:59 -0400 Received: by mail-pl0-f66.google.com with SMTP id n10-v6so6867208plp.0 for ; Sat, 19 May 2018 22:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rBNkb7OILN5RZjzK8NDCCxju48wSSkdiaEhVfVj2Z7w=; b=TPojTFuOIDSsaLpw5+N/U4esC1lHF40ogAa2sFCV+FxtdsT/4CsGMCU4/rCsbgYmOU dRwSUtYc8WJPZKtgaD8lC4VoKojjhl7BF6Q1YLRRyUz0jE4FKrURYmhO6gyxwomrGMow a7AEEU6tCRa2la131ynd6m663E6PVPWyu+PB4UKoDUlLaibAWJYdOX8+ctDNK/KyKLyj 1HP6CmEaIkEKo2yrS9SpP2Jx6KXxEgrlZ8u3kl663kgOO3vwZfTQIfGbozKBd/GSHRXF NpS1LNaCinufGj/tl/0DNCf105d/75qOuwFFcLGO8wx8thngMSGWyoUxrSC6e6Lga9/L f64g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rBNkb7OILN5RZjzK8NDCCxju48wSSkdiaEhVfVj2Z7w=; b=olpwXtwJodTqZKBMeQNi75YZOItCRw4fa3U4rnt0GvexEM+RvEk14o2pbh6AuT6FgD luwun+TxvzPWLzOGc0ZhOY9RNhd5Z88MYMR3PuqJP1QMTKJ53RXgW6ggI6DPB2u+tRrq FpRvoWnOXjBx4RbmJAb271nT2MZ+PzX5lGJLJO0uHcaGMT17Pkn+MFmV3mbuvrT8lbTm jTzVmKRwdMVd8DmAUa4KLGKkXoH4ENXM5NumRmJD4y9HWAiBFsEU5IIw6dSLohbDy4+M xJvMz1V7XrLE8GYbrGtHCdSKrlE/2lsFMVa+G8CymJFrrAcb05zJU9XF8aLknBp9tLyi 0gHA== X-Gm-Message-State: ALKqPwcLwsbQuCsSywvkHacd7OzGpg90zw9ja+1Zwuf3/R96J4BNjgBy RoP7Jh0uWJk9SboL1gGtwrWqQ2S5 X-Google-Smtp-Source: AB8JxZqkz/gKORd5D73QJDOxCnX+92mJPS0L0HatNY7JcKv9qCyS8pxYvLEmEoVro3Yt0pHJ1IHfnA== X-Received: by 2002:a17:902:205:: with SMTP id 5-v6mr12028529plc.301.1526792818355; Sat, 19 May 2018 22:06:58 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id m9-v6sm19488322pff.41.2018.05.19.22.06.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 May 2018 22:06:57 -0700 (PDT) From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Eric Biggers Subject: [PATCH 3/6] crypto: crc32-generic - remove __crc32_le() Date: Sat, 19 May 2018 22:07:39 -0700 Message-Id: <20180520050742.5008-4-ebiggers3@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180520050742.5008-1-ebiggers3@gmail.com> References: <20180520050742.5008-1-ebiggers3@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers The __crc32_le() wrapper function is pointless. Just call crc32_le() directly instead. Signed-off-by: Eric Biggers --- crypto/crc32_generic.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crypto/crc32_generic.c b/crypto/crc32_generic.c index 20b879881a2d..00facd27bcc2 100644 --- a/crypto/crc32_generic.c +++ b/crypto/crc32_generic.c @@ -40,11 +40,6 @@ #define CHKSUM_BLOCK_SIZE 1 #define CHKSUM_DIGEST_SIZE 4 -static u32 __crc32_le(u32 crc, unsigned char const *p, size_t len) -{ - return crc32_le(crc, p, len); -} - /** No default init with ~0 */ static int crc32_cra_init(struct crypto_tfm *tfm) { @@ -55,7 +50,6 @@ static int crc32_cra_init(struct crypto_tfm *tfm) return 0; } - /* * Setting the seed allows arbitrary accumulators and flexible XOR policy * If your algorithm starts with ~0, then XOR with ~0 before you set @@ -89,7 +83,7 @@ static int crc32_update(struct shash_desc *desc, const u8 *data, { u32 *crcp = shash_desc_ctx(desc); - *crcp = __crc32_le(*crcp, data, len); + *crcp = crc32_le(*crcp, data, len); return 0; } @@ -97,7 +91,7 @@ static int crc32_update(struct shash_desc *desc, const u8 *data, static int __crc32_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) { - put_unaligned_le32(__crc32_le(*crcp, data, len), out); + put_unaligned_le32(crc32_le(*crcp, data, len), out); return 0; }