All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function
@ 2019-06-14  9:51 Greg Kroah-Hartman
  2019-06-14  9:51 ` [PATCH 2/2] drm: debugfs: make drm_debugfs_create_files() never fail Greg Kroah-Hartman
  2019-06-14 14:59 ` [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Daniel Vetter
  0 siblings, 2 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-14  9:51 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter
  Cc: Maxime Ripard, Greg Kroah-Hartman, Sean Paul, dri-devel

The function can not fail, and no one checks the current return value,
so just mark it as a void function so no one gets confused.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/drm_debugfs.c | 5 ++---
 include/drm/drm_debugfs.h     | 9 ++++-----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 6f2802e9bfb5..515569002c86 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -270,8 +270,8 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
 }
 
 
-int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
-			     struct drm_minor *minor)
+void drm_debugfs_remove_files(const struct drm_info_list *files, int count,
+			      struct drm_minor *minor)
 {
 	struct list_head *pos, *q;
 	struct drm_info_node *tmp;
@@ -289,7 +289,6 @@ int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
 		}
 	}
 	mutex_unlock(&minor->debugfs_lock);
-	return 0;
 }
 EXPORT_SYMBOL(drm_debugfs_remove_files);
 
diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h
index ac0f75df1ac9..422d0d201c0a 100644
--- a/include/drm/drm_debugfs.h
+++ b/include/drm/drm_debugfs.h
@@ -81,8 +81,8 @@ struct drm_info_node {
 int drm_debugfs_create_files(const struct drm_info_list *files,
 			     int count, struct dentry *root,
 			     struct drm_minor *minor);
-int drm_debugfs_remove_files(const struct drm_info_list *files,
-			     int count, struct drm_minor *minor);
+void drm_debugfs_remove_files(const struct drm_info_list *files,
+			      int count, struct drm_minor *minor);
 #else
 static inline int drm_debugfs_create_files(const struct drm_info_list *files,
 					   int count, struct dentry *root,
@@ -91,10 +91,9 @@ static inline int drm_debugfs_create_files(const struct drm_info_list *files,
 	return 0;
 }
 
-static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
-					   int count, struct drm_minor *minor)
+static inline void drm_debugfs_remove_files(const struct drm_info_list *files,
+					    int count, struct drm_minor *minor)
 {
-	return 0;
 }
 #endif
 
-- 
2.22.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-18 15:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14  9:51 [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Greg Kroah-Hartman
2019-06-14  9:51 ` [PATCH 2/2] drm: debugfs: make drm_debugfs_create_files() never fail Greg Kroah-Hartman
2019-06-14 15:10   ` Daniel Vetter
2019-06-14 14:59 ` [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Daniel Vetter
2019-06-14 15:19   ` Greg Kroah-Hartman
2019-06-14 15:37     ` Daniel Vetter
2019-06-18 12:01       ` Greg Kroah-Hartman
2019-06-18 12:17         ` Daniel Vetter
2019-06-18 15:09           ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.