From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 6229C395DAA for ; Mon, 22 Jun 2026 09:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782119967; cv=none; b=hWNyYwl3Zj7ncSn54KfxFRE4d5BX4Xp+c+McPHFkm1kx93z/RqFxjOFp9SLpysi9CSa/pLrSAhAhAhIGrpN/LyUz6jkS0XXi1VWIZjPgod8Oykr4drFG9WVDLVm+jEW29OEKZCyen5FMtwz/Hbos+PHCLlaF2b9ZQjTu6WH666o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782119967; c=relaxed/simple; bh=DvdDQBSNKUrJs95jz5Zmpusi/4p+JxQ/Qcz0bfdhq3o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YxzDlHkGkK/9i32KE7yOOh1Rc5JSKasRCSxSulBUcfr8Es3QLUMw1x/Gl9lwcP4qA/WeArXFZjt0bGIDWoADET4/iuRaPwI8aW9uhFFy0QnPIbDN/JI5ioAYwysZmD9xIFBNzwahWuw15YSr+ueNJBUx/lXZslG8HMm8i4cVhNQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=So4XebZL; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="So4XebZL" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 821234E405BD; Mon, 22 Jun 2026 09:19:18 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4FA3E601BB; Mon, 22 Jun 2026 09:19:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 15F38106C8977; Mon, 22 Jun 2026 11:19:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782119957; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=2beCXGViMxXHYunWxwL3jEFdLiqEppx5yNhwT5blhMU=; b=So4XebZLUF8VcpCvrbzADEiTaH4X+w5ambDD5vuB/T+0LvyO6nQuzjxX1umWek570HECiX GioMDkFx1gGPLp8zfKN4eQIniqfzg7cOiH20n2UkhGnJCLOzb2PX3kiSwie8G3xnfNYgMJ b4AjAaJV/0EyVMSHvI63nVPVQ+/DuoV/et+3pz7hdMiNH/yeAUp84TXvMK86Z6a8g2VpXU uPfgUYNclROiOrBF0rwT/NiqRcX9YhswxhaFDvKyY6hsVOCFYPrFSCcXLLsKdSe80YRaaN 2h0tIVQegpCfAf9JdWGRfWZ9eiN18F5tFcjnpaiUwNx04Tvb0U5hICDolAPKGg== From: Miquel Raynal To: Pengpeng Hou Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: mtdswap: remove debugfs stats file on teardown In-Reply-To: <20260615090850.80659-1-pengpeng@iscas.ac.cn> (Pengpeng Hou's message of "Mon, 15 Jun 2026 17:08:50 +0800") References: <20260615090850.80659-1-pengpeng@iscas.ac.cn> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Mon, 22 Jun 2026 11:19:14 +0200 Message-ID: <87y0g72ar1.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hello, > @@ -1463,6 +1465,8 @@ static void mtdswap_remove_dev(struct mtd_blktrans_= dev *dev) > { > struct mtdswap_dev *d =3D MTDSWAP_MBD_TO_MTDSWAP(dev); >=20=20 > + if (!IS_ERR_OR_NULL(d->debugfs_stats)) > + debugfs_remove(d->debugfs_stats); Please check debugfs_remove() implementation, the 'if' condition is already handled and therefore does not need to be done here. Thanks, Miqu=C3=A8l