Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1162807rbb; Mon, 26 Feb 2024 00:05:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUryuwx5iarK8CjEumb1Q6K5u+VRKm6e9k7o0v3+/Itg5yPr64h4GIo+XCHGkKLf6B62AzBEBCHshuyy8KMOs8aeoB5G6K61G9F4/9uRw== X-Google-Smtp-Source: AGHT+IFu46ePSch3FIDeJz2N4P7ZqGrZRnWV2wGW6/nKhOftDptrTvVPIOiCgpMFp+Z8KdDaOqWX X-Received: by 2002:a17:906:1917:b0:a3f:7c43:a0e5 with SMTP id a23-20020a170906191700b00a3f7c43a0e5mr3826226eje.60.1708934707428; Mon, 26 Feb 2024 00:05:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708934707; cv=pass; d=google.com; s=arc-20160816; b=F3ANWCVloXefLgZK7d+gBtDz9sVUZzvlMWlBw8+JEOhamWsnGJeWWaZfbCiJLNoPLv eAF5t6pBfYVifyv4N49cmFw+BJqa7+m55x+NjtGC9YuNLiSehNV7TUIj2ZwiPP/ek48I aU5wFAd2uhzfm8YmX1JA9dWVhxfazKhlBMMAQaqiNba9IS3Z+RXDgUutGiro8UlSqA3x 7SJXMacVHLC6pDhkzigPtVomuTAEuVVekc4q5ZHIUdxS0VDnas4m52rTJKSHXrMtyE+C UhYv456CmDpD+DJwA7NrB22h+Wg1otxm5ig8tgGkD2GAJ9Iu5AYTIV9fVRxsjeIfXUNI MEDg== 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=Kg2VWfFxC8HhOdQNokH2Xu1e9r6+/GJ4KwgKG2sCryc=; fh=J4JGuRSITxHw1M8uxHI2S6tP+1gootTCPNP5dEckeKE=; b=LHE2mPFbtW/dUQ55QkXTLYRt9Ii3zd95ufwm9/KwDgyPzB94fhkoftyRGwuGwod8lE XrT+vIPzRLBzF1N1guNhbNyezGbxBffyn5LaAxAgdiYiEyMXJNuaoDFbVNDLyr9LN3hu 5Qu3HHxjCkT73uvKh9MWWVv1ZKitvmXgJh8qYjDOqQA/KJ7m4hZVSTq7rNvdgmQaNlWs BBdCZULkcfxHyCc+7ljWp4nBi8r9+wTBV9lLmT7cYHzkUi+iyVd4Pt79D+X7LyKQ7Pqf sxDBWQ9tb7gfla5Apz1Ezse3JvfBAtCmtrwn3F3jrpSr/dQ/rKZ0WaQyh/GQTcdSUbiN JgSw==; 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-2312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2312-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dv17-20020a170906b81100b00a4131b85b5esi1914607ejb.73.2024.02.26.00.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:05:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-crypto+bounces-2312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2312-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3476E1F235A0 for ; Mon, 26 Feb 2024 08:05:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9DC91C695; Mon, 26 Feb 2024 08:05:02 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.62.65]) (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 A30481C692; Mon, 26 Feb 2024 08:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.62.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708934702; cv=none; b=nGzfX8xr7EmggxUVnsiKi5m3LJWr2Jo4Cowc+FCm8K1W1irfBNKVTdD1xDLwIKGLi7P/QQmyNNLnH3/bblbczs6bSQAazpS6XFelRVJpvnyJkux1EoCiQ72gpRvLXwY+P/31CUtb2Bxgf5t9UpFumqHdamPz6nR7Q/W8dnsoTC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708934702; c=relaxed/simple; bh=dN3E446p7hva0FnMIQ6NFdYTCxG7DQq3CBiJFrGa6Ew=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=BQgfzVqPqqg3kaWnSoSqTwnzJGMvgHXYx8UNWTIk0otiX+L5Loe1YVKxsFB1HF1IdiaN+vQ2tS9R0N+GgUBYiWnfUmp7zHPGZUJXNg+ahPh+NnZzFxPHxBmGv4/LrVcmaWMSV/nmeAUa3GNahWJiqz294wjn292hR4ZWJjzqxuc= 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=114.132.62.65 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: bizesmtp86t1708934613towayw64 X-QQ-Originating-IP: cPL1Ck3yLJrKvXVPFv3NE+RF3uFMoNuGQ35pxT3KDRM= Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Feb 2024 16:03:31 +0800 (CST) X-QQ-SSF: 01400000000000C0B000000A0000000 X-QQ-FEAT: RrZlkntZBflMICK+qs6fwIpCV2d/qsk9tQTFhoQEIKaT681VwUo/mZi9pW5Ep k5lwP9mwmvUt2QBdS310uRcAPLffXOPehuc42UEt/wCNHf+/7u8S45VGzlTcfGHC23d3E75 vqpTuSj1AtuHvx/0sh5Mv4ezn6qFXRJBaSW4RVk3qrzHe4RKByXHxB0bNB25Leq7ft2oO0A OGP64dY2zxxCOYhS+KkycSsm7LU+AcvDyKppNaUg4Uv70uUBpEADPbHuCL9oN8f0N9x429u fjMZ8NzlJx7PAc47q1mFwtN4pzGlPMH98oLm+LOzIIV/MKj/TiHz/jBOFIHhNWRA4SRjcS4 ta28ykuSow/hEtK+tkdFQPPVFOb7Ohg7xHU/sJcbCmHyjKDwUDpwfymOCMa1AAFXtx+bHOM cjoCqCmgnl5yIl8+2CTISg== X-QQ-GoodBg: 1 X-BIZMAIL-ID: 7263635772186819798 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] loongarch/crypto: Clean up useless assignment operations Date: Mon, 26 Feb 2024 16:03:28 +0800 Message-Id: <20240226080328.334021-1-wangyuli@uniontech.com> X-Mailer: git-send-email 2.33.1 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 Both crc32 and crc32c hw accelerated funcs will calculate the remaining len. Those codes are derived from arch/mips/crypto/crc32-mips.c and "len -= sizeof(u32)" is not necessary for 64-bit CPUs. 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.33.1