Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp227347rbe; Wed, 28 Feb 2024 19:05:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWEM2yQN8640T0hPCKk9+yTc1VxfBXPj/yN+KkmcPCSHsa09gvDGaWAhqh7EEUYT4HGTvPCrjjHvOYe2uSusZacveIo/V4vn8LXFEKgwg== X-Google-Smtp-Source: AGHT+IELhBi1of70pLOOf/95x0oFomOguuWPlqF2Gpwg8wSHwUqS058j9YJZS8D8QtHvehiB/dw7 X-Received: by 2002:a05:6a20:c78d:b0:1a0:f5d7:5f49 with SMTP id hk13-20020a056a20c78d00b001a0f5d75f49mr1500573pzb.32.1709175940171; Wed, 28 Feb 2024 19:05:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709175940; cv=pass; d=google.com; s=arc-20160816; b=KKCZ+ByjPXOPp5OA/XplOmD3MZeei6N16Gr4ReJby+398vNcLtt21HnkIf/6GVjRwS secyFeJr43F/RetiYjmWZ9oZV1NCDmXvW+Lj6zdY1fiaQC9ZXGhc7JKLxeBWmjMqCgsZ cQS6Pt9Z/wtSGfVE0zchRIDDYRuiVY6YksRSZkDJK9tjeEYKmqriZMBSAAc3wVe25EKY zGfnlSnjGRWn7+1UZ3IBDrWsVGwB65MmjPnpaR3VKnMedYlFG8lz2ZCDRkftYLyQi00A qHGtPkM69lRU9I2vikk6RtYShjMLvfJYEqRFV22yI8q3cNl7cByyicgmtrqcXBAam5bM dwhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=SDBUCvb3+0S4pHZBgIqoFbEcpHdp+E2pK6k7QPGjXnc=; fh=CgNePn1+t7wQiWOaJG1Vos7dV2NEolt848QtFEHkkuk=; b=0/LB6E95O7DV2Iq3iIQsbzjd7iBibMRFdARl5T8c0i1o8DwbvSug27vJ40GtwZJP2F OfSvWd+588WY23it0J46j+73c19PpNOvmDPvJx1ti5Ct0/DG3Qm5iubZbvtCTz+lC1Tp iypGutWI0exPNxTEtz+3JR5W3rllyLkQ0Y2UdcFdafo/1IiHEJAxR+70bdA3t173NlWx 7tlXxO+e1wsA2AT+lP3IZHll6PYtcIUE9xaWICdN9aP9kNeAFE/SlPf26IjErfBaPP8o TDwGraKIKxwcTK5pys9RyGAcHFnnt/dwKvalZ5P05a9Ui7R7GpmMb/gSGScFiGb9RrPA wGEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gfvWxeR3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id qi14-20020a17090b274e00b00298b0cf9766si603933pjb.48.2024.02.28.19.05.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 19:05:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gfvWxeR3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B0246283CCE for ; Thu, 29 Feb 2024 03:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A33A0364C7; Thu, 29 Feb 2024 03:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gfvWxeR3" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 60CA435F18; Thu, 29 Feb 2024 03:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709175934; cv=none; b=f6IypB2Pnooia/tmc6sCH7GA+VnCDI8XWZ2lJdhBMkyDpCA1LSzX7zB/tODC2f0sSDji/whuV/xUY0um5sU3Tc11AWBXw1RejDBq5emhfu6aaUyhHiT59Z0ApLGL3M0fgq7RzIhLfg4nYXVFCKCZgYIOSFTBjydRn9gfEyXv53E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709175934; c=relaxed/simple; bh=tQQ7xj//LU316ukpe78B00k15tsraKruobbXoWY9rrg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bTRDDc3mgO8KumFvJEQsjbZpweWvEFFwc42FhB6euuJMUXxcPoahZSU+r42R+DjPWjTJJHwEQlhjefBZ5Krn6clI9sdSp9rBEvHBYQdK3V/Ycx0yWrwJluDtlbimW/Gq6UYtreZunE0Rp6cdwO61vtMjKX0m5G/U4cNVPSNrJ3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gfvWxeR3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F118DC433B1; Thu, 29 Feb 2024 03:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709175934; bh=tQQ7xj//LU316ukpe78B00k15tsraKruobbXoWY9rrg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gfvWxeR3pbs8ghgSbBlJCLmuK/7aVZUzt93Irm/LS4k5mTSaydV+NuqvOMspAjW1A 4Bbs3e6FUYLqVah3jC9FsdAUDt0FgVOUy7WVuGe+VBQI0kU91/DcH0tKF+nSr3wlJk L+U4Jg4m3yH30n3/8uRSibcfYK9LL+5mGSKFfM16DSSZBQCEy/deWwknSAfIhjbJ7g a2dBVOWgyeVqrsvpeivOsMsGY0L0V1uI8ni8nY4qpTFdJtrV33cQhp8Wasj5wVxmOM jUZynJQXc8USJyRSrus9rpCOE2Lx2VS8GW/bNuIkJHhY1c3dKH+qACvLhDq2UHCzBx KDzHel7v/SZrQ== Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a3566c0309fso62737066b.1; Wed, 28 Feb 2024 19:05:33 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWXPUCkcNjfDkJvwoG/uJFmH1UA0RQcQQbstxzJllOed7Q7QbcXavP38hFJh31Mo6ZNZEs3dRb6dhe4yUi2hsULAG+1e41ann4/M0wKbBoUfd3w//P5JxZYYI9SrD3OLZRWiEsipGnMbcta X-Gm-Message-State: AOJu0Yywx1SDd9XisWST2nWhy+XCIb+WOselyuZVc7ZJ1lV/5+t4gn9p X6cSrS6plvwvzWjWxvWkd0FCvtEJfaTEL58Omu0O7KHJ19pgm3lhdOYfPnjnWri5XDGhMEYdF8/ VNm0Pf+ap9yT8DZhWCCrTQuVdW54= X-Received: by 2002:a17:906:ca49:b0:a44:1be1:66f0 with SMTP id jx9-20020a170906ca4900b00a441be166f0mr447407ejb.57.1709175932312; Wed, 28 Feb 2024 19:05:32 -0800 (PST) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240226080328.334021-1-wangyuli@uniontech.com> In-Reply-To: <20240226080328.334021-1-wangyuli@uniontech.com> From: Huacai Chen Date: Thu, 29 Feb 2024 11:05:22 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] loongarch/crypto: Clean up useless assignment operations To: WangYuli Cc: herbert@gondor.apana.org.au, davem@davemloft.net, kernel@xen0n.name, linux-crypto@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Guan Wentao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Yuli, The code is fine to me, please change loongarch to LoongArch in the subject, and update your commit message with Xuerui's review in V2. Huacai On Mon, Feb 26, 2024 at 4:04=E2=80=AFPM WangYuli w= rote: > > 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 -=3D 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/cry= pto/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, un= signed int len) > > CRC32(crc, value, w); > p +=3D sizeof(u32); > - len -=3D sizeof(u32); > } > > if (len & sizeof(u16)) { > @@ -80,7 +79,6 @@ static u32 crc32c_loongarch_hw(u32 crc_, const u8 *p, u= nsigned int len) > > CRC32C(crc, value, w); > p +=3D sizeof(u32); > - len -=3D sizeof(u32); > } > > if (len & sizeof(u16)) { > -- > 2.33.1 >