Commit 8ad463ac authored by Wambui Karuga's avatar Wambui Karuga Committed by Daniel Vetter

drm/vram-helper: remove unneeded #if defined/endif guards.

Remove unneeded #if/#endif guards for checking whether the
CONFIG_DEBUG_FS option is set or not. If the option is not set, the
compiler optimizes the functions making the guards
unnecessary.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323112802.228214-1-wambui.karugax@gmail.com
parent 7707f722
...@@ -1018,7 +1018,6 @@ static struct ttm_bo_driver bo_driver = { ...@@ -1018,7 +1018,6 @@ static struct ttm_bo_driver bo_driver = {
* struct drm_vram_mm * struct drm_vram_mm
*/ */
#if defined(CONFIG_DEBUG_FS)
static int drm_vram_mm_debugfs(struct seq_file *m, void *data) static int drm_vram_mm_debugfs(struct seq_file *m, void *data)
{ {
struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_info_node *node = (struct drm_info_node *) m->private;
...@@ -1035,7 +1034,6 @@ static int drm_vram_mm_debugfs(struct seq_file *m, void *data) ...@@ -1035,7 +1034,6 @@ static int drm_vram_mm_debugfs(struct seq_file *m, void *data)
static const struct drm_info_list drm_vram_mm_debugfs_list[] = { static const struct drm_info_list drm_vram_mm_debugfs_list[] = {
{ "vram-mm", drm_vram_mm_debugfs, 0, NULL }, { "vram-mm", drm_vram_mm_debugfs, 0, NULL },
}; };
#endif
/** /**
* drm_vram_mm_debugfs_init() - Register VRAM MM debugfs file. * drm_vram_mm_debugfs_init() - Register VRAM MM debugfs file.
...@@ -1045,11 +1043,9 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = { ...@@ -1045,11 +1043,9 @@ static const struct drm_info_list drm_vram_mm_debugfs_list[] = {
*/ */
void drm_vram_mm_debugfs_init(struct drm_minor *minor) void drm_vram_mm_debugfs_init(struct drm_minor *minor)
{ {
#if defined(CONFIG_DEBUG_FS)
drm_debugfs_create_files(drm_vram_mm_debugfs_list, drm_debugfs_create_files(drm_vram_mm_debugfs_list,
ARRAY_SIZE(drm_vram_mm_debugfs_list), ARRAY_SIZE(drm_vram_mm_debugfs_list),
minor->debugfs_root, minor); minor->debugfs_root, minor);
#endif
} }
EXPORT_SYMBOL(drm_vram_mm_debugfs_init); EXPORT_SYMBOL(drm_vram_mm_debugfs_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment