From patchwork Wed Sep 22 10:22:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 1531155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=YbreczRM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDvWV5vmVz9sSn for ; Wed, 22 Sep 2021 20:23:02 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mSzP1-00012a-8z; Wed, 22 Sep 2021 10:22:59 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mSzOz-00012U-Q5 for fwts-devel@lists.ubuntu.com; Wed, 22 Sep 2021 10:22:57 +0000 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 845204191E; Wed, 22 Sep 2021 10:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632306177; bh=c7D2pGa2G5vBa461Lbp2b5Mnk+f8+HHHmtv6Xo3o+mY=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=YbreczRMK/gGbH81qzdAGlUdoC1OvSnwr0mFVh85yc9WdsDfY6KviIvD3YmQHV7Na VvfFUFfdbIEydolN2VlKFl9D9sQp8d0HKLO0uaPc8zdCkyk4/aXWa3H/8mF+wx5quQ zGqvcQT4Jbbl8C7NTIA1KoO3PzdNcrfRlW0SAPkOFwA8r1Kdk+kvwMay69ohVLx014 YjGPTyFCmBeP4I6DZT1mOTzX+9c9J2EkBZGnofHyqiERczn71+uKd7FVcti/Cdy4gL ARdkq7XhKkZDV08nQyglJzJMYDeBOXuIMC3+XQHsvrTRWeqtydf4/3voo8ahOWgCc9 EFXPSYt5UU/kA== From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] bios: smm: remove redundant variable n Date: Wed, 22 Sep 2021 11:22:57 +0100 Message-Id: <20210922102257.177783-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King The variable n is being assigned but is not read afterwards. The variable can be removed. Cleans up cppcheck style warnings. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/bios/smm/smm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bios/smm/smm.c b/src/bios/smm/smm.c index 24ca126e..5b2eb2cc 100644 --- a/src/bios/smm/smm.c +++ b/src/bios/smm/smm.c @@ -58,14 +58,13 @@ static int smm_test0(fwts_framework *fw) { uint8_t config[256]; bool passed = true; - ssize_t n; int fd; if ((fd = open(FWTS_INTEL_HOST_PATH, O_RDONLY)) < 0) { fwts_log_warning(fw, "Could not open PCI HOST bridge config data\n"); return FWTS_ERROR; } - if ((n = read(fd, config, sizeof(config))) < 0) { + if (read(fd, config, sizeof(config)) < 0) { fwts_log_warning(fw, "Could not read PCI HOST bridge config data\n"); (void)close(fd); return FWTS_ERROR;