Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2389934lqp; Sun, 24 Mar 2024 17:18:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUI5xOF4Av0NDNKpESOh2MnZrwR6tBvX3M/CiZZ7KBNU+YFZc5f8+eDuM5GhwxFsaMtm2y9RGChgU9brRZilKibX7wyBbd/1SIk0m1SjQ== X-Google-Smtp-Source: AGHT+IGiRlOtp1d3uu6yXDXbDigvVZ5LsIn2FkRAVbSp82DkCwtUVIxnAF2aFvkCz8YFHsJ3Q+Jr X-Received: by 2002:a17:902:d583:b0:1e0:9964:76f4 with SMTP id k3-20020a170902d58300b001e0996476f4mr7750358plh.14.1711325890046; Sun, 24 Mar 2024 17:18:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325890; cv=pass; d=google.com; s=arc-20160816; b=ythdZV/uZNosh4M/CIkRzKsPFYxWzpxY3YWEsOhew0vmVVBho9ZSpVnmfMcyWtJL4e d0EFmdZn71o0fuwAMd5Jll5bEQf3cFgnjo/o/2KA4haIvsO642lF2GXKomVqy/d8UznT c7lip6zhr9Odz6lNO5dNz2BKRl+B1R+WXmt+AKJ8M1aVzUBLH7qkpllbfAfGDXhC0f+x fsaCvIhbDwUCU8G6moeaiZ+tG2AaeOQfhagj8G33NU5xg0kzE8Zk98NTBNEiJuRL3Khs iUjbks1REgGBX4C+YFbfFdeR+W5JKQZDGXrtzlmX8bWgJDBNa6/QL6jfzk+KLnIVqt/7 QwDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CbDasjtT3zY0ASZk2sYPjjkIhwFgJ8mEobNn19tMmbU=; fh=fd39tcrvp7hxb/eBBDrJv4g2sjXJvK9+7fidlxvZgTo=; b=N5xSwgIf0ft1DDoCQg/k9A2+Ap/vB0P5BCKU8gj4GV5eV/akY4RAkXThAxYPtrVcEk R3afQ8WNfDVU6REsQcP3bXN8ZYbJ2LyexAmKOSxzDeHN/Dy2s7jvFnpTPSdFkDe/4r+s +SCztWTWtoWagYaXEHJK1rc62ovlLlS7/YvBi7qoOBjuQMyM8ZFcz0+1exZXfL7wlPoL 6ZTl9oJALj3zR5dM+vjH9zCc0vU671L5sKfxIF3Dnh91QHSdGveWDVG4ba5bwnOBw6wV 8eZ+kcqCV5WeYNIdXgnMN8XROUOnwEeldZGQpzZY5H5+ZxoX2AfX0zkldo9mc+Ad4lNg rw8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LK6c9G6Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113361-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113361-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. [139.178.88.99]) by mx.google.com with ESMTPS id z15-20020a170903018f00b001e039a372a9si4292515plg.418.2024.03.24.17.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113361-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LK6c9G6Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113361-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113361-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 B89952826DA for ; Mon, 25 Mar 2024 00:18:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A19C19C3D4; Sun, 24 Mar 2024 22:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LK6c9G6Z" 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 8D0B419C3B4; Sun, 24 Mar 2024 22:42:42 +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=1711320162; cv=none; b=rPFpnWBqCuUSPAgkAPk4R+n9Q8ewpwD4D6Ta7G9ebrIerU62rHwYIFmf6sFa5hAewmgK7j1NqVY8ep4LD9+IPyrwlg2f+DdisbvhJt5TWpN9OBQS3N9qzjFddmCCDPg7SLi76DSVWZAyXtCgZgqFh6rYa/EEE/Qx3oyile4uyTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320162; c=relaxed/simple; bh=6U5Xrb0s90JnDdGWdSIaci7y6uJqRFUxnTGE2SLegaw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jkG0UHLF5UBemOqZG3PhTtg4DAP7OGk96QX9IduT8tQKY1h1jHfXJ9V+iiWUAVOaNriMMSlK/kEQe0K73VanPEy8xlkQi1pWCQVUQzx1C+DSfV7RfWqwZlDBLBnZkGsBCotGmR6phRHlBqumojwnWbFU/67JuX3Xatcfv3+7xNQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LK6c9G6Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8F91C433F1; Sun, 24 Mar 2024 22:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320162; bh=6U5Xrb0s90JnDdGWdSIaci7y6uJqRFUxnTGE2SLegaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LK6c9G6ZVbRpr/KVN9gnXAegT/1Nd+k/45uVcECyIKSur2F7vJqYRtWyVCOLkokIs DvKvEb7oj1ifqXUlOp7faDu3sghJ12KATcC5EAFcG6bRwLc/w6a19DgOuB3qPyWBu8 vW7/vDsRGRG17OqcrpgiU4qNSQfm1BRxufJ2yxiU0BXyr9wOPF2axYIL0jE3pFt3Xs MTGaGL5FVfIkhC1ctOCnWfBSqBNGs+M3ueBMzYenNIR3Q7LVZKYdL3GAkGYQyhyuzj iw4z84qiOrBhtAe79eR3hAnTNCRGjgOUiVy/HyvInRdtqoCm1FTt1NTWdc5KAnQSSI j382ZVhmy5dbg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Adam Guerin , Giovanni Cabiddu , Herbert Xu , Sasha Levin Subject: [PATCH 6.8 470/715] crypto: qat - remove double initialization of value Date: Sun, 24 Mar 2024 18:30:49 -0400 Message-ID: <20240324223455.1342824-471-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Adam Guerin [ Upstream commit a66cf93ab33853f17b8cc33a99263dd0a383a1a1 ] Remove double initialization of the reg variable. This is to fix the following warning when compiling the QAT driver using clang scan-build: drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c:1010:6: warning: Value stored to 'reg' during its initialization is never read [deadcode.DeadStores] 1010 | u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SSMCPPERR); | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c:1109:6: warning: Value stored to 'reg' during its initialization is never read [deadcode.DeadStores] 1109 | u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SER_ERR_SSMSH); | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 99b1c9826e48 ("crypto: qat - count QAT GEN4 errors") Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c b/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c index 048c246079390..2dd3772bf58a6 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c +++ b/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c @@ -1007,8 +1007,7 @@ static bool adf_handle_spppar_err(struct adf_accel_dev *accel_dev, static bool adf_handle_ssmcpppar_err(struct adf_accel_dev *accel_dev, void __iomem *csr, u32 iastatssm) { - u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SSMCPPERR); - u32 bits_num = BITS_PER_REG(reg); + u32 reg, bits_num = BITS_PER_REG(reg); bool reset_required = false; unsigned long errs_bits; u32 bit_iterator; @@ -1106,8 +1105,7 @@ static bool adf_handle_rf_parr_err(struct adf_accel_dev *accel_dev, static bool adf_handle_ser_err_ssmsh(struct adf_accel_dev *accel_dev, void __iomem *csr, u32 iastatssm) { - u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SER_ERR_SSMSH); - u32 bits_num = BITS_PER_REG(reg); + u32 reg, bits_num = BITS_PER_REG(reg); bool reset_required = false; unsigned long errs_bits; u32 bit_iterator; -- 2.43.0