Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp332906lqb; Thu, 29 Feb 2024 02:14:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWU0B98z1QiXOeWMhjojEhj43laBEh3GA3qrSVP0sQiVbahJHVutQnCeNRqlcdnWDwgC4BnUS3ywACJK8SdL8UQ3ChsmGSVeAGSKzPSaA== X-Google-Smtp-Source: AGHT+IGTGO1RzuCaLEc0t75Ms4iEbtWTsRPvCHvZknuU+VjibOamBilbe2Yj8naP/l2NHIKHSRPD X-Received: by 2002:a05:620a:1585:b0:787:fd85:dfb with SMTP id d5-20020a05620a158500b00787fd850dfbmr1134432qkk.36.1709201641134; Thu, 29 Feb 2024 02:14:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709201641; cv=pass; d=google.com; s=arc-20160816; b=RdAm/MlW7bSm58YWymzz+f4N1JAOyVnEWNxoXU4Fs1OLheZUKHaYpzxiDpnXF/Cg0e gi/5g6QtGdyE5z7eeeabPPwE7OtigB26GTAhTa8LPAHHhe6BUZwwQFJjS6VLeWhhi7cm BOib1SRH1Ha3r5HirwqBKMgZaGD5jPPSaWEZwYJ3khXEMKq1HnpQXk1d6Tu6fcqDhznd UmFpmwoBJN2yg1QiTOutusvAlyubjdNMwiv+FrKPsnwVeJCaYSgBr61MNuoyRK9BAcIf 1KgpGtGIW7MbzJVBJJcaDTZGBTrqI7zEGBZnIckQ12XXsSdUt4KMRmfwD540wjJBizin +5XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=7jmTI3NBpgwdChdhAJjj+IX27+HLu7gf7+I9XRMCwB4=; fh=J4JGuRSITxHw1M8uxHI2S6tP+1gootTCPNP5dEckeKE=; b=SCq95AG4oZM60gGuYQr1i1ZLyyBt/UbcgDQs9jZl71aKDhTTFAelt8nshk66VO2Y1M 5saGfUXkyaZKoJrd3BfBxfNp0NeoL5EaDs4tbnRNHX3lKRQ6ftUMYgQaM4eVklZITVnX ZiU2Btl+oZjKR4cFG7hS8GVdpcMWNnnuI6/its1Z7FsDl2Ds12ZsiI/SmoEJ4o2gdTxT jVvO3DKGEu8XIhRewjzBH8oeAd1B5qp/Td+umpPwKsnyBIPkBxMNo/MJB2XMuP+nXJqL KBI57MQxVmx7JSv2wuojwQHbHdCyf3i2bFgWX85ACqS8aPW0bI5j5kZIbS1CqdnOsGLE ab4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-crypto+bounces-2389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2389-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g19-20020a05620a219300b007876c39c716si1066276qka.258.2024.02.29.02.14.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 02:14:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-crypto+bounces-2389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2389-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D84E71C20BF2 for ; Thu, 29 Feb 2024 10:14:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC77963511; Thu, 29 Feb 2024 10:13:57 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from smtpbg154.qq.com (smtpbg154.qq.com [15.184.224.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A93D634FA; Thu, 29 Feb 2024 10:13:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=15.184.224.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709201637; cv=none; b=DJ14bd8UNbzd11tqZwdkWs2p/wRzgZJ/BDXO0WHkFeh7h+a1enaoBTTJGiFinaCJ16tYGlnuIdBRjG1aSQJjAud/kPH2X3isLcQpDIdjIdV+l8GjS5qYZF8dMvcT0JOVHTK6SaDyljRkeMA2UBC9hPo4f3y88kdPR2j68o0kmtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709201637; c=relaxed/simple; bh=8NZVv0lkuZlY6+A2M5F1zaJ3Ds4jXdulvQdDZTK2V0E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rx3YjGJP9DMT4zaqWFL9tmQC6ICXCKyb3YAK1DXZG1+wcKjn7TxyHJjwZqlg98l0V/7y1cMSeY2wS853hlU1MPlBSfj6c9WjG5FVUIMjYS4aTFNc5Jdn4URF5N8iNT/JCvatFnCEaUcblPkizrXMOmNW4OalRDgg3MaE5F3eqtU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; arc=none smtp.client-ip=15.184.224.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com X-QQ-mid: bizesmtp80t1709201113t32ib1l5 X-QQ-Originating-IP: darFS/AnfPpgCRo7otCbYoD5Wd/NwnLY6XQ6Qd04Thk= Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 29 Feb 2024 18:05:11 +0800 (CST) X-QQ-SSF: 01400000000000C0B000000A0000000 X-QQ-FEAT: znfcQSa1hKYmF0jHFgph+YrvzbCpdq/0E1K0TlIRQBz/8ddzsf+8rJH47uuYR u+FqG3YXNgS533wDh5NenF2q0B/FXDJYvMpu2SHxLgyAC/4HCGtWvn7o+X1pFfgfTWUTA4U MGW+z3jkKG/vrk15Ihh6fTFkLak8qU4uni5GFb4dbZ9bjwAhBPVkGgWOQBWBiqlRmTeklZ2 9PsiJG/sz6BJAsheURugGIFtrSBrK/H2Ri6rvcZpyHc9m9mPeYB9v0ea37khJ78w5lV2k/m KgRYlc8he3dfst2lSHmD+k0BmfQ8ckHP6kKyVYa1wZqY3TnePr+4fb2zS59uItG+MrhzdTC D9ObeIq4uqUQmpa4xu3w5HKvkDImTgLFpYrJ8DL1/JCsxNAhFmwE8YMjpAfxFBVR3RuVcyu OdNtYJnpuVw= X-QQ-GoodBg: 1 X-BIZMAIL-ID: 5336942437654610621 From: WangYuli To: herbert@gondor.apana.org.au, davem@davemloft.net, chenhuacai@kernel.org, kernel@xen0n.name Cc: linux-crypto@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, WangYuli , Guan Wentao Subject: [PATCH v2] LoongArch/crypto: Clean up useless assignment operations Date: Thu, 29 Feb 2024 18:04:49 +0800 Message-ID: <79D75E042AE5B03F+20240229100449.1001261-1-wangyuli@uniontech.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 The LoongArch CRC32 hw acceleration is based on arch/mips/crypto/crc32-mips.c. While the MIPS code supports both MIPS32 and MIPS64, LA32 lacks the CRC instruction. As a result, "line len -= sizeof(u32)" is unnecessary. Removing it can make context code style more unified and improve code readability. Suggested-by: Guan Wentao Signed-off-by: WangYuli --- arch/loongarch/crypto/crc32-loongarch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/loongarch/crypto/crc32-loongarch.c b/arch/loongarch/crypto/crc32-loongarch.c index a49e507af38c..3eebea3a7b47 100644 --- a/arch/loongarch/crypto/crc32-loongarch.c +++ b/arch/loongarch/crypto/crc32-loongarch.c @@ -44,7 +44,6 @@ static u32 crc32_loongarch_hw(u32 crc_, const u8 *p, unsigned int len) CRC32(crc, value, w); p += sizeof(u32); - len -= sizeof(u32); } if (len & sizeof(u16)) { @@ -80,7 +79,6 @@ static u32 crc32c_loongarch_hw(u32 crc_, const u8 *p, unsigned int len) CRC32C(crc, value, w); p += sizeof(u32); - len -= sizeof(u32); } if (len & sizeof(u16)) { -- 2.43.0