From nobody Mon Feb 9 05:38:42 2026 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 204BD2765D2 for ; Wed, 7 Jan 2026 06:40:41 +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=1767768042; cv=none; b=q90AkB6tP+q0YttGPbpCx1MEDkUSi6Kg6658tJ2whi9ZucBLLdoJN55Lcb86jtAygTODRYZdk/VWw1nSJwyRNEmgIgW2HtfP3oTxx1fLU0fI3WbyJRif2E18gDvx4ASo/hPDtYIasf/RcTcpzoT5QW8C2MbSDE5jdWXDiYuEVbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767768042; c=relaxed/simple; bh=nFhF6S8DstvshptYvGBB1v0YlfOMKI3HcVg72TFbNAk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HQH+jZ+0NuqN/nn0qWysft10RrFAR6X5G73FNUwg6KUvDXCBtfZ1ixIuis5lSzxWucmytBei7JAJ22z5MaoLcbagVkL4++i1Bi7fO39GUCWdeYJZ6qMuElIgkAxb8HmN5mJbA0GN1ErLY1q4lO9WfH4eT1R9kJ8g9mawWizLygk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IFkavGbn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IFkavGbn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01A3FC19422; Wed, 7 Jan 2026 06:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767768041; bh=nFhF6S8DstvshptYvGBB1v0YlfOMKI3HcVg72TFbNAk=; h=From:To:Cc:Subject:Date:From; b=IFkavGbnLt4r7y37c5CpUQz3D6/KoNudpL5WbvJ/o30EysXJsGcr3Vq5dIMMVqqm7 SE0e2ITYr/vTOHVf0IkwNUBslWYx4HoA4Sok6yT2oXe1hzddU/C+/N0RzuvBCgeWwE pku7FKz38LOPbebOEkB1MgCOw9TjqNsYVvaVIJ96dSlmGeIiyZsVsSfNLAV89b1NMI vfgWnIwTmDbeOtvO9cqj7B17+9mlywPeD3IJt8snyaL4jlfLgbsWhfPvcKUTtuUUsC gJIYIONpuVNalMqCGCMXFt+UmP7g3u1XXJpPXO1wFniGnfCvvKyhuikCNBcUgpTL7+ 575lFXNykDr4w== From: alexs@kernel.org To: Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org (open list:USER-MODE LINUX (UML)), linux-kernel@vger.kernel.org (open list) Cc: linux-kernel@vger.kernel.org, Alex Shi , kernel test robot , linux-um@lists.infradead.org Subject: [PATCH] arch/um: remove unused varible err in remove_files_and_dir() Date: Wed, 7 Jan 2026 14:40:09 +0800 Message-ID: <20260107064009.15380-1-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Alex Shi err is duplicated with errno, and never used. So remove it to fix warnning: arch/um/os-Linux/umid.c:139:16: warning: variable 'err' set but not used [-= Wunused-but-set-variable] 139 | int fd, p, n, err; | ^ Reported-by: kernel test robot Signed-off-by: Alex Shi Cc: linux-um@lists.infradead.org Cc: Johannes Berg Cc: Anton Ivanov Cc: Richard Weinberger --- 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 eb523ab1e218..6b488be2c545 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 fd, p, n, err; + int fd, p, n; size_t filelen =3D strlen(dir) + sizeof("/pid") + 1; =20 file =3D malloc(filelen); @@ -155,7 +155,6 @@ static inline int is_umdir_used(char *dir) goto out; } =20 - err =3D 0; n =3D read(fd, pid, sizeof(pid)); if (n < 0) { printk(UM_KERN_ERR "is_umdir_used : couldn't read pid file " --=20 2.43.0