Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1896069lqb; Mon, 27 May 2024 00:37:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSJ+nko5HfuXnR0t1s0FmC64GH+9n09q/dpBFUelblb0pt1t+/QRbB834cxu2qhs3OgPRX2yStmlQpzWUO2PRixg8YFH6dUpwlNkxjzQ== X-Google-Smtp-Source: AGHT+IFonqiws4yqxcI/qbz5dQvNzW1vBqsTwaqeFdiiYj1ypfQ6UOJp2jx++zojn/AVSZ6pRa9C X-Received: by 2002:a17:90a:b009:b0:2b6:208c:2aee with SMTP id 98e67ed59e1d1-2bf5bb6b2abmr12033555a91.20.1716795433117; Mon, 27 May 2024 00:37:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716795433; cv=pass; d=google.com; s=arc-20160816; b=a0F838I/cmy2CMD4WzTWoN4VlaLkCIeyL8FRQ17Owk3bRooUfBBB7ImxUMB2pNfmp4 /7gwR7Ide//DtuM4N12rbMDoZVmb08LVn2kq30Rl8L66elpaCknBo7Xbz54LEn1OXN9S 9iDZJ2dJLt/mGpz00uyTH6HpgNSCRetxCqCQ/CqqdcbGmVMyTe9rkLVO0ehK4ag0Q1Tx MJL0DpBKZs+/BcHz9pHodbuz586aWDtKQC64Lke0PP2qLjHLid11hC6n/fIfmlcrS6Fy 2Ve6D9Gp2w4FYJ7QUf+XFkhGi3lzLz3LyLMpb9UYs1HRWp3zNjXIS5P8WHOBaRiIsQ2h oEIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=VBSf5WJfOeiRvmVnfvvg9XfmLtB4q3XU9XahlNvUllc=; fh=ejZKMPXw/wpgIkBgg4R8fhS2jsJTspCs9srLwjcCwrU=; b=RIm9jLicIMye5mbdDzCqzL1oR2jcL/LznMtg+S3/HUpHzDOuPVgzbcWHJZ/ggiJrjF no718/WFjCaaCV6xPtSDF4GJ5pI9pKzxIDhDBAAxwYgdPm7RU5JGC59ZB5/P9fVL2Owq O8BYs352GcftAR5XanmuU6+dOlaCbfLGJNTTryYI9rWyg+hOkcEGKFSom4DgtzuU0ido +QH0H3atvZd8PEtoO47TeEId/HNcgzMyk3bqvK1SUSyjUPzgv5s5A8Tz+HjgF+kunKg6 RMvpP3KvCCQa6avchTJalFegEle8jB6cM4u+SouSF8fZ2D0rnkfYeTeAoDub2UAp7LUZ JEMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-190150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf5fe3476asi3353277a91.96.2024.05.27.00.37.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 00:37:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-190150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9F7D4B21498 for ; Mon, 27 May 2024 07:37:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0B9F282E1; Mon, 27 May 2024 07:37:01 +0000 (UTC) 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 20BD517BCA; Mon, 27 May 2024 07:37:00 +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=1716795421; cv=none; b=GO7c7ff9+97K5RpxOSxXF6uyZAs6QlUgiPTMxzwwz/K20Te4X8N82JRdezcDSOXcMIYhYyPJH4f2P0kJXk489VEpghkN7Vl4K6b4LVrxrXNxVzX7+Tord7cuDcTOKiJ/bPS2w6Im6UzxQYPy2IjwVK/bn2r0VF2PUBfz+KQUq6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716795421; c=relaxed/simple; bh=Tps1WcBqzODmDeBQ5rvvGnK4LLWmDVbt14aJ/jjiKe4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WucXtLktDGMHeGSgg9wz5yudGS+RZSy4MjGBanQ5p/Nuf4wQSA5Z1fJrEY1qkSmqPHjTg4SvTw9xcHP2kVvBipYBoOX8uFi8MatC7pdUO4F44ZroiMEDcsdymiwsUq15WTunr1MhM0+V4QzFOcNnqqMcsRlcTpvq1nwuufEj/Ek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3517C4AF0E; Mon, 27 May 2024 07:36:59 +0000 (UTC) Message-ID: <785a3e80-7cc8-40e6-8e4f-f741a8f343af@xs4all.nl> Date: Mon, 27 May 2024 09:36:57 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: mgb4: Fix double debugfs remove To: tumic@gpxsee.org, Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Martin_T=C5=AFma?= References: <20240521162254.3025-1-tumic@gpxsee.org> Content-Language: en-US, nl From: Hans Verkuil Autocrypt: addr=hverkuil@xs4all.nl; keydata= xsFNBFQ84W0BEAC7EF1iL4s3tY8cRTVkJT/297h0Hz0ypA+ByVM4CdU9sN6ua/YoFlr9k0K4 BFUlg7JzJoUuRbKxkYb8mmqOe722j7N3HO8+ofnio5cAP5W0WwDpM0kM84BeHU0aPSTsWiGR yw55SOK2JBSq7hueotWLfJLobMWhQii0Zd83hGT9SIt9uHaHjgwmtTH7MSTIiaY6N14nw2Ud C6Uykc1va0Wqqc2ov5ihgk/2k2SKa02ookQI3e79laOrbZl5BOXNKR9LguuOZdX4XYR3Zi6/ BsJ7pVCK9xkiVf8svlEl94IHb+sa1KrlgGv3fn5xgzDw8Z222TfFceDL/2EzUyTdWc4GaPMC E/c1B4UOle6ZHg02+I8tZicjzj5+yffv1lB5A1btG+AmoZrgf0X2O1B96fqgHx8w9PIpVERN YsmkfxvhfP3MO3oHh8UY1OLKdlKamMneCLk2up1Zlli347KMjHAVjBAiy8qOguKF9k7HOjif JCLYTkggrRiEiE1xg4tblBNj8WGyKH+u/hwwwBqCd/Px2HvhAsJQ7DwuuB3vBAp845BJYUU3 06kRihFqbO0vEt4QmcQDcbWINeZ2zX5TK7QQ91ldHdqJn6MhXulPKcM8tCkdD8YNXXKyKqNl UV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SWsRQp2LxFCkwnCXOra gYmkrmv0duG1FStpY+IIQn1TOkuXrciTVfZY1cZD0aVxwlxXBnUNZZNslldvXFtndxR0SFat sflovhDxKyhFwXOP0Rv8H378/+14TaykknRBIKEc0+lcr+EMOSUR5eg4aURb8Gc3Uc7fgQ6q UssTXzHPyj1hAyDpfu8DzAwlh4kKFTodxSsKAjI45SLjadSc94/5Gy8645Y1KgBzBPTH7Q== In-Reply-To: <20240521162254.3025-1-tumic@gpxsee.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Martin, On 21/05/2024 18:22, tumic@gpxsee.org wrote: > From: Martin Tůma > > Fixes an error where debugfs_remove_recursive() is called first on a parent > directory and then again on a child which causes a kernel panic. I accepted this patch for v6.10, but I would appreciate it if you can make an additional patch for v6.11 that removes the #ifdef CONFIG_DEBUG_FS lines where possible. Most debugfs functions have a dummy implementation when that define is not set, so it would clean up the driver if these unnecessary #ifdefs are removed. Regards, Hans > > Signed-off-by: Martin Tůma > --- > drivers/media/pci/mgb4/mgb4_core.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/pci/mgb4/mgb4_core.c b/drivers/media/pci/mgb4/mgb4_core.c > index 60498a5abebf..ab4f07e2e560 100644 > --- a/drivers/media/pci/mgb4/mgb4_core.c > +++ b/drivers/media/pci/mgb4/mgb4_core.c > @@ -642,9 +642,6 @@ static void mgb4_remove(struct pci_dev *pdev) > struct mgb4_dev *mgbdev = pci_get_drvdata(pdev); > int i; > > -#ifdef CONFIG_DEBUG_FS > - debugfs_remove_recursive(mgbdev->debugfs); > -#endif > #if IS_REACHABLE(CONFIG_HWMON) > hwmon_device_unregister(mgbdev->hwmon_dev); > #endif > @@ -659,6 +656,10 @@ static void mgb4_remove(struct pci_dev *pdev) > if (mgbdev->vin[i]) > mgb4_vin_free(mgbdev->vin[i]); > > +#ifdef CONFIG_DEBUG_FS > + debugfs_remove_recursive(mgbdev->debugfs); > +#endif > + > device_remove_groups(&mgbdev->pdev->dev, mgb4_pci_groups); > free_spi(mgbdev); > free_i2c(mgbdev); > > base-commit: 8771b7f31b7fff91a998e6afdb60650d4bac59a5