drm/panthor: Fix build warning when DEBUG_FS is disabled
Commit a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM
objects over DebugFS") causes a build warning and linking error when
built without support for DebugFS, because of a non-inline non-static
function declaration in a header file.
On top of that, the function is only being used inside a single
compilation unit, so there is no point in exposing it as a global
symbol.
This is a follow-up from Arnd Bergmann's first fix.
Also move panthor_gem_debugfs_set_usage_flags() into panthor_gem.c and
declare it static.
Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/dri-devel/20250424142419.47b9d457@collabora.com/T/#t
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20250424184041.356191-1-adrian.larumbe@collabora.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
This commit is contained in:
parent
6e99efe1a5
commit
e3750149ec
2 changed files with 5 additions and 8 deletions
|
|
@ -42,11 +42,16 @@ static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo)
|
||||||
mutex_unlock(&ptdev->gems.lock);
|
mutex_unlock(&ptdev->gems.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object *bo, u32 usage_flags)
|
||||||
|
{
|
||||||
|
bo->debugfs.flags = usage_flags | PANTHOR_DEBUGFS_GEM_USAGE_FLAG_INITIALIZED;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static void panthor_gem_debugfs_bo_add(struct panthor_device *ptdev,
|
static void panthor_gem_debugfs_bo_add(struct panthor_device *ptdev,
|
||||||
struct panthor_gem_object *bo)
|
struct panthor_gem_object *bo)
|
||||||
{}
|
{}
|
||||||
static void panthor_gem_debugfs_bo_rm(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) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void panthor_gem_free_object(struct drm_gem_object *obj)
|
static void panthor_gem_free_object(struct drm_gem_object *obj)
|
||||||
|
|
|
||||||
|
|
@ -212,14 +212,6 @@ void panthor_kernel_bo_destroy(struct panthor_kernel_bo *bo);
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
void panthor_gem_debugfs_print_bos(struct panthor_device *pfdev,
|
void panthor_gem_debugfs_print_bos(struct panthor_device *pfdev,
|
||||||
struct seq_file *m);
|
struct seq_file *m);
|
||||||
static inline void
|
|
||||||
panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object *bo, u32 usage_flags)
|
|
||||||
{
|
|
||||||
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
|
#endif
|
||||||
|
|
||||||
#endif /* __PANTHOR_GEM_H__ */
|
#endif /* __PANTHOR_GEM_H__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue