On Thu, 24 Apr 2025 14:10:16 +0200
"Arnd Bergmann" <a...@arndb.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?

Reply via email to