From patchwork Wed Jun 1 07:46:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haowen Bai X-Patchwork-Id: 1637774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ck7zxIom; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LCh6t5J9qz9s0r for ; Wed, 1 Jun 2022 17:46:46 +1000 (AEST) 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=ZJudnALa9Lj5esGImBb6gaiJaRCQGJFY4AhfZcNaz6s=; b=ck7zxIomGw3XTc iFSFXUQHihNKmBIRlNNDfZ+sz9bRuXEdU+yclaGO5eyoFbFT8YQO//Wo6kbJ/wBR1xT2fdmThI0tn glQTSKAQLakJbJn6chEJJCp8rxtF7P1J5UPYTJHZE6xvrMs10mhgC6jkSyql26n6S88gVF6hL6dab LMWFBGgNTAAs8YBuHoIE7YsghP1O8uw+fnO9dxxgTlNLmNwxO3jEJADPXNcRlglAIXjo73mIVzW3e 9MnMi76aokAV20d2zjuu/TVUwwk1+s0UdAL2HcZY5tBhegO4hmY+HyJ5thcSqVfAviWOWGjxVUDBM +1omXbw2L55vBRtoT9Cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwJ3r-00ESi0-OR; Wed, 01 Jun 2022 07:46:35 +0000 Received: from edge05.meizu.com ([157.122.146.251] helo=mail.meizu.com) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwJ3o-00ESdP-Cu for linux-um@lists.infradead.org; Wed, 01 Jun 2022 07:46:34 +0000 Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail12.meizu.com (172.16.1.108) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 1 Jun 2022 15:46:08 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Wed, 1 Jun 2022 15:46:06 +0800 From: Haowen Bai To: Richard Weinberger , Anton Ivanov , Johannes Berg CC: Haowen Bai , , Subject: [PATCH] um: remove unused variable Date: Wed, 1 Jun 2022 15:46:05 +0800 Message-ID: <1654069565-6968-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_004632_701496_A74A9CD7 X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The variable dead is initialized but never used otherwise. Signed-off-by: Haowen Bai --- arch/um/os-Linux/umid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index a3dd61521d24..7a1abb829930 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c @@ -136,7 +136,7 @@ static int remove [...] Content analysis details: (1.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: linux-um@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-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The variable dead is initialized but never used otherwise. Signed-off-by: Haowen Bai --- arch/um/os-Linux/umid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index a3dd61521d24..7a1abb829930 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c @@ -136,7 +136,7 @@ static int remove_files_and_dir(char *dir) static inline int is_umdir_used(char *dir) { char pid[sizeof("nnnnnnnnn")], *end, *file; - int dead, fd, p, n, err; + int fd, p, n, err; size_t filelen = strlen(dir) + sizeof("/pid") + 1; file = malloc(filelen); @@ -145,7 +145,6 @@ static inline int is_umdir_used(char *dir) snprintf(file, filelen, "%s/pid", dir); - dead = 0; fd = open(file, O_RDONLY); if (fd < 0) { fd = -errno;