From patchwork Wed Mar 1 03:32:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Liu X-Patchwork-Id: 13155815 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 615F8C64ED6 for ; Wed, 1 Mar 2023 10:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FSjxk9hEMoxH17CT0dWOVdTpsxGfx42gbKdQTe4urK8=; b=dwooLNFfayFWFQ IJKyCekUv4UvhHTL4TgkPQOT2ScP1KTgVDBmkkjqQCPD25JXMhFyYSFfBcEIrrJDpL704XDC3wo95 6TyyhZgFhdn8eNjdP9U+++6pvgDQjOsXA/h3sWN/O5rh+oEiXbdnddkeNyDFkbV050AZKuZd5eVY4 W476aLWaBUb8P1gGw2UYWfUmacDcirVkXlFpvWTSGMD9f6PnktUh+pT9r5d4JgBD3PKNbL5Vvk0YF a5MMB+ZkMxd7dH/EE+KA6YcNqDLHpH0Qxn1E1SppFWoHel6iZohB5VlPIMQLKJffYpOpPStoVfWqv Agn+/nbnndh4l0j3TLoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXJxu-00FomK-R7; Wed, 01 Mar 2023 10:45:42 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXJxs-00FomB-Rm for linux-arm-kernel@bombadil.infradead.org; Wed, 01 Mar 2023 10:45:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=veAsQrTdgSKEL0csbCH+yCxAWbwd0z9n2JfuQWVXE+M=; b=ByoFWPRb0BxRd5FJC6hsxPgiU5 IgVUk4L2Eys/CaFS6OJVABFiEyFIeEaksL4DbXqVGY9CG78acBQS2RhOqiVmbK4mmYmwa0KUIGxWV LB9/3sVPr/ISKo6zka80SkoypT4ODK0zIuPfiRuVfml+ab6kmDdlut6NHM3zartPXUXpUenwKSwYX q3XlKW08AUmiua+ZDcaGZRfMOY7Dfa7GzBkqlLr2wVXlbkoh3VFreWVV5zBct+2mxE0eGCj7zv6wO E+mvr4fvsx9gIPnxL0iwrxn3jdhpWVYHs13XA1gLoYWvqwq0gUTq/dBr6hVAkux1DptTY+lMDuKuF 6MJYqdfw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pXDEG-00ElQL-1a for linux-arm-kernel@lists.infradead.org; Wed, 01 Mar 2023 03:34:11 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 3213IphW072955; Wed, 1 Mar 2023 11:18:51 +0800 (GMT-8) (envelope-from neal_liu@aspeedtech.com) Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Mar 2023 11:32:15 +0800 From: Neal Liu To: Joel Stanley , Andrew Jeffery , Neal Liu , Herbert Xu , "David S . Miller" CC: , , , , "kernel test robot" , Dan Carpenter Subject: [PATCH] crypto: aspeed: fix uninitialized symbol 'idx' warning Date: Wed, 1 Mar 2023 11:32:05 +0800 Message-ID: <20230301033205.2137450-1-neal_liu@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [192.168.10.10] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 3213IphW072955 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230301_033409_618779_86A663D4 X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'idx' is not initialized if it's not EXP_MODE nor MOD_MODE. Use "else" instead to fix it. Signed-off-by: Neal Liu Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302261052.CVFRyq6F-lkp@intel.com/ --- drivers/crypto/aspeed/aspeed-acry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/aspeed/aspeed-acry.c b/drivers/crypto/aspeed/aspeed-acry.c index 1f77ebd73489..828dc3ae1b5f 100644 --- a/drivers/crypto/aspeed/aspeed-acry.c +++ b/drivers/crypto/aspeed/aspeed-acry.c @@ -289,7 +289,7 @@ static int aspeed_acry_rsa_ctx_copy(struct aspeed_acry_dev *acry_dev, void *buf, if (mode == ASPEED_RSA_EXP_MODE) idx = acry_dev->exp_dw_mapping[j - 1]; - else if (mode == ASPEED_RSA_MOD_MODE) + else /* mode == ASPEED_RSA_MOD_MODE */ idx = acry_dev->mod_dw_mapping[j - 1]; dw_buf[idx] = cpu_to_le32(data);