Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp820348rdg; Fri, 11 Aug 2023 00:07:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiXrIAmgX4LraXqd/SuHMJ11J+s92+uNdaAE4zNTmumbFTuqFhbv3Otx/U9pFbsoxy9exg X-Received: by 2002:a05:6a00:24cb:b0:66d:263f:d923 with SMTP id d11-20020a056a0024cb00b0066d263fd923mr1135993pfv.20.1691737639723; Fri, 11 Aug 2023 00:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691737639; cv=none; d=google.com; s=arc-20160816; b=eqanglKCN4Pwe1egThxjUqcDLV+JWjNPu55Eq2Bx3Vqn0125MuzIH7/vTEMq1SQI1G bW2NYs6jE69+WBnHkhRgQ68HdcDmUD7t8roB9UNj5+XdmQV02uBd056dMeBIIOzRmu5J FX98+Oa5LVzwRmAIbjY1gUUlPheq05b4O/VTk+DH56WZmQFdB6kquoH3JWGNbGLyvJD2 6cqCbfoEEXA+qH2xL+i01fqLppeQOsJvlU0lNNyC1/1Y3jvMTyz3rB0bAyTwGkY/w3PH phaw/0+xabaEhhjgAJWQvL5/QtyKJu7xXOC10KJLMDKxQXh8Poq78HW0JEnjc7ipZWD0 RadQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=jF7veAJCg7xxofNq8kFXr6on39XUtII8DDbN01UPOg8=; fh=59DP+w3TB7cxfAR0PEpZ85VDWRhm5KJVSqmIi00UXks=; b=IodXKUeEkv8OSXFVgx1DUN/EIEJESlsyqb452NdigLUS0VukUniu35E6E4WSqxbEQO HbQ/uQxieFfNE4NW35WMXlwy+XqPU+Fx2jDDTliHS1OjJeRAAAE3NJ5i4b9gPiDy/5KP vA2mUc5YArx6cqVGfW/SPOaQsXF/i3rN1154glEjo1Szb8JM/nCdbOJbGVwFtrMq8HTC urxJ706HSuLBYKKUBu9d9x468SotUn0yWyD/AGaer5Oziz1e1hiTKoYPxoXJO2MkPdKF /TiAz1CCsQK81fkJJ/aIvQOfaycYa/WqHn/U+LpHXqBu4n9GET4aHHvtAY7RCJ2h4Hly ILbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MhHDCWrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a056a00219500b00665e0165510si3038384pfi.252.2023.08.11.00.07.07; Fri, 11 Aug 2023 00:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ti.com header.s=ti-com-17Q1 header.b=MhHDCWrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231726AbjHKGkg (ORCPT + 99 others); Fri, 11 Aug 2023 02:40:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjHKGkf (ORCPT ); Fri, 11 Aug 2023 02:40:35 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48C9D2694; Thu, 10 Aug 2023 23:40:34 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 37B6eBOd021185; Fri, 11 Aug 2023 01:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691736011; bh=jF7veAJCg7xxofNq8kFXr6on39XUtII8DDbN01UPOg8=; h=From:To:CC:Subject:In-Reply-To:References:Date; b=MhHDCWrW7h5mBgJXO24FHVkVesCB2J1yMupcXIKgKUUEhjv0ANFaSIFdhoq1W+EBh riNtETxC2Mrr0SMFPYC2wRJZR0jNszh/ZCbWKD1aapk+XXLq+7HX0+ZOjm0EVuJyBb LqskMROLcAzz3aYAD+h86I8WyRXq65Engmxb/tMA= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 37B6eBpO122620 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Aug 2023 01:40:11 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 11 Aug 2023 01:40:10 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 11 Aug 2023 01:40:10 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 37B6e914007531; Fri, 11 Aug 2023 01:40:09 -0500 From: Kamlesh Gurudasani To: Eric Biggers 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 , , , , , Subject: Re: [EXTERNAL] Re: [PATCH v2 2/6] crypto: crc64 - add crc64-iso framework In-Reply-To: <20230811042423.GA1295@sol.localdomain> References: <20230719-mcrc-upstream-v2-0-4152b987e4c2@ti.com> <20230719-mcrc-upstream-v2-2-4152b987e4c2@ti.com> <20230811042423.GA1295@sol.localdomain> Date: Fri, 11 Aug 2023 12:10:09 +0530 Message-ID: <87r0oadquu.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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_PASS,SPF_PASS,URIBL_BLOCKED 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-kernel@vger.kernel.org Eric Biggers writes: > 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 Thanks for the review, Eric. Will remove this in next revision. Regards, Kamlesh