[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424142419.47b9d457@collabora.com>
Date: Thu, 24 Apr 2025 14:24:19 +0200
From: Boris Brezillon <boris.brezillon@...labora.com>
To: "Arnd Bergmann" <arnd@...db.de>
Cc: "Arnd Bergmann" <arnd@...nel.org>, "Steven Price"
<steven.price@....com>, "Liviu Dudau" <liviu.dudau@....com>, "Maarten
Lankhorst" <maarten.lankhorst@...ux.intel.com>, "Maxime Ripard"
<mripard@...nel.org>, "Thomas Zimmermann" <tzimmermann@...e.de>, "Dave
Airlie" <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>,
Adrián Larumbe <adrian.larumbe@...labora.com>, "Dmitry
Osipenko" <dmitry.osipenko@...labora.com>, "Florent Tomasin"
<florent.tomasin@....com>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/panthor: fix building without CONFIG_DEBUG_FS
On Thu, 24 Apr 2025 14:10:16 +0200
"Arnd Bergmann" <arnd@...db.de> wrote:
> On Thu, Apr 24, 2025, at 13:41, Boris Brezillon wrote:
> > On Thu, 24 Apr 2025 13:25:47 +0200
> >> +#ifdef CONFIG_DEBUG_FS
> >> bo->debugfs.flags = usage_flags | PANTHOR_DEBUGFS_GEM_USAGE_FLAG_INITIALIZED;
> >> -}
> >> -
> >> -#else
> >> -void panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object *bo, u32 usage_flags) {};
> >> #endif
> >> +}
> >>
> >
> > Oops. I actually don't see a good reason to expose this function, so
> > could we go for something like that instead?
>
> I think moving it into pantor_gem.c makes sense, and it certainly
> avoids the build warning.
>
> > #else
> > static void panthor_gem_debugfs_bo_add(struct panthor_device *ptdev,
> > struct panthor_gem_object *bo)
> > {}
> > static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo) {}
> > +static void panthor_gem_debugfs_set_usage_flags(struct
> > panthor_gem_object *bo,
> > + u32 usage_flags)
> > +{
>
> Side note: I think the panthor_gem_debugfs_bo_{add,rm} stubs could
> actually be replaced with an IS_ENABLED() check in the normal
> functions, but that wouldn't work for
> panthor_gem_debugfs_set_usage_flags or
> panthor_gem_debugfs_print_bos().
Yeah, I think I prefer consistency over saving a few LoC ;-).
Do you plan to send a v2 with the suggested changes, or should we take
care of that?
Powered by blists - more mailing lists