Message ID | 79D75E042AE5B03F+20240229100449.1001261-1-wangyuli@uniontech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-86526-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp301893dyb; Thu, 29 Feb 2024 02:34:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/bhoxGrs+wtJzd58KkddcPoLrzY9QoyMF605gLx+Y/Urj0pTbqNKkkkGl7No+xHnkDXrvjv9Dekb9ciEV31a+G+PiVw== X-Google-Smtp-Source: AGHT+IFym7WRHrjIkSjsArwo4zZzalOWFFkt+zSncHZ0PUW2qDgBwLucVDwfHDxKIO4aUgUQDqQo X-Received: by 2002:a17:902:ce8a:b0:1dc:cf17:8a70 with SMTP id f10-20020a170902ce8a00b001dccf178a70mr2057467plg.29.1709202894136; Thu, 29 Feb 2024 02:34:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709202894; cv=pass; d=google.com; s=arc-20160816; b=qDRRmdd2aB0ZBIJ6ZVXO0Py0F2TroB5o7gmylWRhwevet/CgQgVgNjcs3gjVPE7K1W DjCrMUBXHDhBzaklINkuNKQXB5CnYzyqZE28yeMwqpaNUIbUYsOmB6D2NgoWuvm2/rDh IcJRD7mvnLhaBXXEnMbJZ8++vywUNZSuJG6Uw4c1To0eQRpsUiZmPC5fdSv+Y3z1Xax+ Fc9dvEyIRm1x+r0CnbeA0kMgE8kncGp6vxkqTUnnzUItOIr2DO6D9c1SIWIFkGwM0kt6 TaFTmwCO55NH9WLPOpkAWKS7GJXDfgYoZHbkv95pabGMlQogVTui+od5kY7SdqaW9X9q ALVw== 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=qwHHtCClEksPHNs0ObT0Hs1YyTt5FoGZ61PyzvS71CsjVGVekpv6jagk8pExV1S1He d1zfU/WofVZOlmMOJreK4ojxdk59N29F3GEubHteIi3DoPCd/DAJvdNanfM2BwuMaDMp h1q+rmKmlVd3jSU6q0TssEOouo4pXkn4d+LZIOWiiuYCvnycByyVz34qAaAgyu7DsBvb QB9gWIBfyjMfpMu1fK+GPTHPk+V5Z2xFC7+YssLRxODbOLcKoYdvb/z7Vw5YrncNrxEo A7GO55fhB5j6kkf8114N5AZuwWeRLlEoSnpMJFFCky62z+WC8VeHzjVTTd9R5C6t1Lf1 ZoLA==; 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-kernel+bounces-86526-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86526-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x9-20020a1709029a4900b001dc3789a2bfsi1018310plv.495.2024.02.29.02.34.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 02:34:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86526-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-kernel+bounces-86526-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86526-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9F226B2A4DC for <ouuuleilei@gmail.com>; Thu, 29 Feb 2024 10:14:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 422AF64AA8; Thu, 29 Feb 2024 10:13:59 +0000 (UTC) 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 <wangyuli@uniontech.com> 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 <wangyuli@uniontech.com>, Guan Wentao <guanwentao@uniontech.com> 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-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792229133810742209 X-GMAIL-MSGID: 1792229133810742209 |
Series |
[v2] LoongArch/crypto: Clean up useless assignment operations
|
|
Commit Message
WangYuli
Feb. 29, 2024, 10:04 a.m. UTC
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 <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
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)) {