[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YYGtso8/Uym+9Jwb@Red>
Date: Tue, 2 Nov 2021 22:29:22 +0100
From: LABBE Corentin <clabbe@...libre.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: mchehab@...nel.org, hverkuil@...all.nl, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, mjpeg-users@...ts.sourceforge.net
Subject: Re: [PATCH v2 04/10] staging: media: zoran: add debugfs
Le Tue, Nov 02, 2021 at 08:40:28PM +0300, Dan Carpenter a écrit :
> On Sun, Oct 17, 2021 at 10:05:06PM +0200, LABBE Corentin wrote:
> > Le Thu, Oct 14, 2021 at 10:37:52AM +0300, Dan Carpenter a écrit :
> > > On Wed, Oct 13, 2021 at 06:58:06PM +0000, Corentin Labbe wrote:
> > > > +config VIDEO_ZORAN_DEBUG
> > > > + bool "Enable zoran debugfs"
> > > > + depends on VIDEO_ZORAN
> > > > + depends on DEBUG_FS
> > > > + help
> > > > + Say y to enable zoran debug file.
> > > > + This will create /sys/kernel/debug/CARD_NAME/debug for displaying
> > > > + stats and debug information.
> > >
> > > Why bother with a CONFIG? Just make it always on?
> > >
> >
> > Hello
> >
> > I love to provides choice to user (and so avoid a dep on DEBUG_FS), even if I think I am the only one remaining user.
>
> Sorry, for the delay, I was on vacation.
>
> No, there is no depends on DEBUG_FS in the method that I am describing.
>
> How that works is when DEBUG_FS is turned on then it's on for everything,
> but when it's disabled it's disabled for everything. You do not need
> the "depends on DEBUG_FS" and if you make this an option the it feels
> like it should be a selects DEBUG_FS instead.
>
> How this normally works is that when you have debugfs disabled, there
> are dummy files in the debugfs .h files. I bet the compiler can tell
> most of those are empty and removes them. So if you have DEBUG_FS then
> it doesn't use that much more memory than when VIDEO_ZORAN_DEBUG is
> disabled.
>
> I don't know if I'm being clear at all #jetlag.
>
> It should be easy to check. Just remove the "depends on DEBUG_FS" and
> enable VIDEO_ZORAN_DEBUG. Disable DEBUG_FS. It should still build fine
> because of the dummy functions. That's build 1. Then disable
> VIDEO_ZORAN_DEBUG and that's build 2. See how much memory difference
> there is between 1 and 2.
>
No worry for the delay.
Anyway, I have removed VIDEO_ZORAN_DEBUG in v3 since Hans Verkuil also asked for its removing.
Regards
Powered by blists - more mailing lists