Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp778476rdg; Thu, 10 Aug 2023 21:53:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUkWmb8q+XdIcR+poaR5/4biFjtDoZNW01NImX73YreaXArcU3p2QWF88A2b9k504HknCT X-Received: by 2002:a05:6358:3388:b0:12b:da97:aba6 with SMTP id i8-20020a056358338800b0012bda97aba6mr1200782rwd.24.1691729611911; Thu, 10 Aug 2023 21:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691729611; cv=none; d=google.com; s=arc-20160816; b=tQoe9R0M47wrZ3v/vSn5LfydDSz0y0LVHHXyzm3VFj+qzb/8aBwHZOU8hxHoYJeu18 esH8rDcBpQmqBcLRSQC143ULoO325Q3ONxKjXOr+sL6K3HzZ+FfvA1ty2ZeuPYQ6Tgpr Ji27zct3wgk/KvUzhDH4YwIWtmmE1HTeGUkHt9l+t2p8Wwr7IWHAR59MjhbCWN5HkaAl YwA2fKJYYagiXaVt/+JYaZnLSvzXjoLtlpuZOeUlM8W3OnUcQFOFEKG1PVq4/tVgwcey SCZNCVhPHSfV8L7V8kyD4HODthZ0RAXNrXHy54yvXqBruzus2XePdT/5vOaVGImoLt12 Dd8Q== 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=+5XPsI0GUyEurPVsEqCoGARJ0sW6usQzzAQk9Br5Ml4=; fh=QmCn4HnGA+H3d/OXlbWy1+w+ikPe5fSyYiG0ncSDf+s=; b=wCnJhLpBuRUy0ieT5HEzziTEc7lUFgMxes/qsB2Q9iM2WRDH1YO8T+nD1EdavWIisw eeAUEpTdoP2uDmZzzpa92C+tQjJYIlUYaFnRkcvH7LIcojVQk3OHxHp+bPzh7xLs6fuy a2FHn6D5iwiyf0hyeQ1tEUkNboasHW3QisWZTayYgar4VorkMJdhQukp2WnYxNMJtEuy wDc45Vct9sthwk/p3IwDOP2qGxfKXv/hk5ODwX1x9Y3RoOBTq5AZA3JHx7eg2PTTK5dI H7nmjVQf9YgtqAgnQYAPQ3/0sKtGY53pbpFvFeJQvHUqWmnEP3OWXoIEnTPV2STehijd xZNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tDwSTMyk; 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 s23-20020a63d057000000b00563fa953bc2si2834829pgi.419.2023.08.10.21.53.10; Thu, 10 Aug 2023 21:53:31 -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=tDwSTMyk; 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 S229552AbjHKEY1 (ORCPT + 99 others); Fri, 11 Aug 2023 00:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjHKEY0 (ORCPT ); Fri, 11 Aug 2023 00:24:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E983213B; Thu, 10 Aug 2023 21:24:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E5D9762C26; Fri, 11 Aug 2023 04:24:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2C27C433C7; Fri, 11 Aug 2023 04:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691727865; bh=tFTch+Vt3hmXVV5W6NxEILrRRxKFsve4GjiYPL3bFxI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tDwSTMykeWxpIGLeOu3IiYkMhslf3W0y9Wd7xmQudpL+OJX6C2GX3kZkJzcIPO0AQ Bh9FzaJP6YfG6qeTg3ulmo0/+YSn8TQ4CJSlv44kV7jKQVjZnpxZoEbawJ83Ns+sD+ s+eSVrjCTmW+8Ais4F+9lsn1QSbgeRvh9HMLNdNXu3osjyDo2T4OPY7GMsIFmNE9V6 OBaHWJ6EEBKvhFqyHprATLQeyixBG6wAYb8j9pnQvm2UOhjiUGH519JqOlBKseeRjm tpu7AufenVwScWolHFut7isQfj5tTE2TGkA7Bj4iwJ4gQoufZ5ZFcX1NnKnxJYoH50 zk8bxUwLkhfbQ== Date: Thu, 10 Aug 2023 21:24:23 -0700 From: Eric Biggers To: Kamlesh Gurudasani Cc: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Catalin Marinas , Will Deacon , Maxime Coquelin , Alexandre Torgue , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH v2 2/6] crypto: crc64 - add crc64-iso framework Message-ID: <20230811042423.GA1295@sol.localdomain> References: <20230719-mcrc-upstream-v2-0-4152b987e4c2@ti.com> <20230719-mcrc-upstream-v2-2-4152b987e4c2@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719-mcrc-upstream-v2-2-4152b987e4c2@ti.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Fri, Aug 11, 2023 at 12:58:49AM +0530, Kamlesh Gurudasani wrote: > diff --git a/lib/crc64-iso.c b/lib/crc64-iso.c > new file mode 100644 > index 000000000000..d6e803124fa0 [...] > +u64 crc64_iso_update(u64 crc, const unsigned char *buffer, size_t len) > +{ > + struct { > + struct shash_desc shash; > + u64 crc; > + } desc; > + int err; > + > + if (static_branch_unlikely(&crc64_iso_fallback)) > + return crc64_iso_generic(crc, buffer, len); > + > + rcu_read_lock(); > + desc.shash.tfm = rcu_dereference(crc64_iso_tfm); > + desc.crc = crc; > + err = crypto_shash_update(&desc.shash, buffer, len); > + rcu_read_unlock(); > + > + WARN_ON_ONCE(err); > + > + return desc.crc; > +} > +EXPORT_SYMBOL_GPL(crc64_iso_update); > + > +u64 crc64_iso(const unsigned char *buffer, size_t len) > +{ > + return crc64_iso_update(0, buffer, len); > +} > +EXPORT_SYMBOL_GPL(crc64_iso); These functions are never called. Why are you trying to add unused code to the kernel? - Eric