drm/vram-helper: remove unneeded #if defined/endif guards.
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/drm_gem_vram_helper.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/drm_gem_vram_helper.c +0 -4
@@ -1018,7 +1018,6 @@ static struct ttm_bo_driver bo_driver = {* struct drm_vram_mm */ -#if defined(CONFIG_DEBUG_FS )static int drm_vram_mm_debugfs (struct seq_file *m,void *data) {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)static const struct drm_info_list drm_vram_mm_debugfs_list[] = { {"vram-mm" , drm_vram_mm_debugfs,0 ,NULL }, }; -#endif /** * 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[] = {*/ void drm_vram_mm_debugfs_init (struct drm_minor *minor) { -#if defined(CONFIG_DEBUG_FS )drm_debugfs_create_files (drm_vram_mm_debugfs_list,ARRAY_SIZE (drm_vram_mm_debugfs_list), minor->debugfs_root, minor); -#endif }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);
Signature · 1 line
2.25.1
Quoted 44 lines · Wambui Karuga
Remove unneeded #if/#endif guards for checking whether the
CONFIG_DEBUG_FSoption is set or not. If the option is not set, the compiler optimizes the functions making the guards unnecessary.Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/drm_gem_vram_helper.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-4@@ -1018,7 +1018,6 @@ static struct ttm_bo_driver bo_driver = {* struct drm_vram_mm */ -#if defined(CONFIG_DEBUG_FS )static int drm_vram_mm_debugfs (struct seq_file *m,void *data) {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)static const struct drm_info_list drm_vram_mm_debugfs_list[] = { {"vram-mm" , drm_vram_mm_debugfs,0 ,NULL }, }; -#endif /** * 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[] = {*/ void drm_vram_mm_debugfs_init (struct drm_minor *minor) { -#if defined(CONFIG_DEBUG_FS )drm_debugfs_create_files (drm_vram_mm_debugfs_list,ARRAY_SIZE (drm_vram_mm_debugfs_list), minor->debugfs_root, minor); -#endif }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);Signature · 1 line
2.25.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 7 lines · Greg KH
Quoted 6 lines · Wambui Karuga
Remove unneeded #if/#endif guards for checking whether the
CONFIG_DEBUG_FSoption is set or not. If the option is not set, the compiler optimizes the functions making the guards unnecessary.Signed-off-by Wambui Karuga <[email protected]>
Applied, thanks a lot.
-Daniel
Quoted 40 lines
Quoted 38 lines
--- drivers/gpu/drm/drm_gem_vram_helper.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/drm_gem_vram_helper.c +0
-4@@ -1018,7 +1018,6 @@ static struct ttm_bo_driver bo_driver = {* struct drm_vram_mm */ -#if defined(CONFIG_DEBUG_FS )static int drm_vram_mm_debugfs (struct seq_file *m,void *data) {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)static const struct drm_info_list drm_vram_mm_debugfs_list[] = { {"vram-mm" , drm_vram_mm_debugfs,0 ,NULL }, }; -#endif /** * 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[] = {*/ void drm_vram_mm_debugfs_init (struct drm_minor *minor) { -#if defined(CONFIG_DEBUG_FS )drm_debugfs_create_files (drm_vram_mm_debugfs_list,ARRAY_SIZE (drm_vram_mm_debugfs_list), minor->debugfs_root, minor); -#endif }EXPORT_SYMBOL (drm_vram_mm_debugfs_init);Signature · 1 line
2.25.1Reviewed-by Greg Kroah-Hartman <[email protected]>
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel