From patchwork Thu Jul 7 08:05:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12909202 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C762C43334 for ; Thu, 7 Jul 2022 08:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233163AbiGGIFx (ORCPT ); Thu, 7 Jul 2022 04:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234328AbiGGIFu (ORCPT ); Thu, 7 Jul 2022 04:05:50 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99EA225C5; Thu, 7 Jul 2022 01:05:49 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id o4so25157488wrh.3; Thu, 07 Jul 2022 01:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fT8yeQg+Dwj7jLKoZKRv3i/G9RY+Y7eY8PKDxd9w8hA=; b=ZeTCv2aBHlwKcpvH4HrdTxO8SeNk80W9HL97yV67/wJ160DEhooyCRtBgbDrppemtk rV6+QX8xoIJr8eVj6vh7+G/4YCHeEuY3zh4lrYdNlgr4OSyAZVDuFiGZtr1ZLUYqHAmN rnxXx5QNT/gOY9hFMPKyOMsWHYNMC0pwWFA1Uuxmbqhy8o097do+q+Ez/vZt0iREtUCS leGctn0ZYFrcveuNipCgDEQrUz+jq8//9faMlhnhfJaCW4lCXNbXkeeyHJYuT++RUSTa m6/b0Z/cIwqSd4wqYRR05trgLGNbci6mjwwI755OuI93ucyT5gJcHKefGH1CA+UhTWlL wi1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fT8yeQg+Dwj7jLKoZKRv3i/G9RY+Y7eY8PKDxd9w8hA=; b=j49w3+z8kUNtaEOytMpafeaMQzsZEdPxGE9rUBkrmYao87sQFLYRUwT5Z8xQ18wMgt oBiZreg2xuz6Z845KonX6TcK1IeZmNDFhGzekubS0VYRhPMMqvfEv2b7efMbQ4vv8mXw wSeXeZI/lXFGOzsM90CfvsdjRdTddU9PQYLiTOXHUoX+PxLNze+OsUTYzlJvtvS5lnaW rbgSZ96drpxY/ydSgotBVmfJvQYeK3mcqYaoZ3ps8A6URmV//eV550vR07inZW38xaQ2 fs+Nm1AVYFU6DJIRhw+/izw/Ulo2Dy4YmTCwIlAeR+44X7uvR6jErenxvJwp3/705xdR r9FQ== X-Gm-Message-State: AJIora8CTzlsFMYrDTi8ghDXJ4BAT5ois6+pb5bwCnYCVtgft39S2chQ zhdh6ctm1QATZkEwnvQynG0= X-Google-Smtp-Source: AGRyM1sVEaAi/ACaCFuYmX/AjTVaucTEZ2FSvQb4EKGdf+bATvP2UhtY7kxzVh1XxGYT2IHaHfKtEw== X-Received: by 2002:a05:6000:1a41:b0:20e:687f:1c3 with SMTP id t1-20020a0560001a4100b0020e687f01c3mr41709333wry.415.1657181148039; Thu, 07 Jul 2022 01:05:48 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id p41-20020a05600c1da900b003a0231af43csm14640482wms.48.2022.07.07.01.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 01:05:47 -0700 (PDT) From: Colin Ian King To: Herbert Xu , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , linux-crypto@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: x86/blowfish: remove redundant assignment to variable nytes Date: Thu, 7 Jul 2022 09:05:46 +0100 Message-Id: <20220707080546.151730-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Variable nbytes is being assigned a value that is never read, it is being re-assigned in the next statement in the while-loop. The assignment is redundant and can be removed. Cleans up clang scan-build warnings, e.g.: arch/x86/crypto/blowfish_glue.c:147:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' Signed-off-by: Colin Ian King --- arch/x86/crypto/blowfish_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index ba06322c1e39..019c64c1340a 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto/blowfish_glue.c @@ -144,7 +144,7 @@ static int cbc_encrypt(struct skcipher_request *req) err = skcipher_walk_virt(&walk, req, false); - while ((nbytes = walk.nbytes)) { + while (walk.nbytes) { nbytes = __cbc_encrypt(ctx, &walk); err = skcipher_walk_done(&walk, nbytes); } @@ -225,7 +225,7 @@ static int cbc_decrypt(struct skcipher_request *req) err = skcipher_walk_virt(&walk, req, false); - while ((nbytes = walk.nbytes)) { + while (walk.nbytes) { nbytes = __cbc_decrypt(ctx, &walk); err = skcipher_walk_done(&walk, nbytes); }