All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm: Constify struct drm_info_list * arguments
@ 2013-10-17 18:09 Damien Lespiau
  2013-10-17 18:09 ` [PATCH 2/4] drm: Remove drm_debugfs_node and drm_debugfs_list Damien Lespiau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Damien Lespiau @ 2013-10-17 18:09 UTC (permalink / raw)
  To: dri-devel

Those functions are just reading data from those pointers.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/drm_debugfs.c | 4 ++--
 include/drm/drmP.h            | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index a05087c..4813ff1 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -84,7 +84,7 @@ static const struct file_operations drm_debugfs_fops = {
  * Create a given set of debugfs files represented by an array of
  * gdm_debugfs_lists in the given root directory.
  */
-int drm_debugfs_create_files(struct drm_info_list *files, int count,
+int drm_debugfs_create_files(const struct drm_info_list *files, int count,
 			     struct dentry *root, struct drm_minor *minor)
 {
 	struct drm_device *dev = minor->dev;
@@ -188,7 +188,7 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
  *
  * Remove all debugfs entries created by debugfs_init().
  */
-int drm_debugfs_remove_files(struct drm_info_list *files, int count,
+int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
 			     struct drm_minor *minor)
 {
 	struct list_head *pos, *q;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 2b954ad..c3b659a 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1470,10 +1470,11 @@ extern struct drm_local_map *drm_getsarea(struct drm_device *dev);
 #if defined(CONFIG_DEBUG_FS)
 extern int drm_debugfs_init(struct drm_minor *minor, int minor_id,
 			    struct dentry *root);
-extern int drm_debugfs_create_files(struct drm_info_list *files, int count,
-				    struct dentry *root, struct drm_minor *minor);
-extern int drm_debugfs_remove_files(struct drm_info_list *files, int count,
-                                    struct drm_minor *minor);
+extern int drm_debugfs_create_files(const struct drm_info_list *files,
+				    int count, struct dentry *root,
+				    struct drm_minor *minor);
+extern int drm_debugfs_remove_files(const struct drm_info_list *files,
+				    int count, struct drm_minor *minor);
 extern int drm_debugfs_cleanup(struct drm_minor *minor);
 #endif
 
-- 
1.8.3.1

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

* [PATCH 2/4] drm: Remove drm_debugfs_node and drm_debugfs_list
  2013-10-17 18:09 [PATCH 1/4] drm: Constify struct drm_info_list * arguments Damien Lespiau
@ 2013-10-17 18:09 ` Damien Lespiau
  2013-10-17 18:09 ` [PATCH 3/4] drm: Make drm_debugfs_list const Damien Lespiau
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Damien Lespiau @ 2013-10-17 18:09 UTC (permalink / raw)
  To: dri-devel

Those structures are not used anywhere.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 include/drm/drmP.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c3b659a..1c502ff 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -997,27 +997,6 @@ struct drm_driver {
 #define DRM_MINOR_CONTROL 2
 #define DRM_MINOR_RENDER 3
 
-
-/**
- * debugfs node list. This structure represents a debugfs file to
- * be created by the drm core
- */
-struct drm_debugfs_list {
-	const char *name; /** file name */
-	int (*show)(struct seq_file*, void*); /** show callback */
-	u32 driver_features; /**< Required driver features for this entry */
-};
-
-/**
- * debugfs node structure. This structure represents a debugfs file.
- */
-struct drm_debugfs_node {
-	struct list_head list;
-	struct drm_minor *minor;
-	struct drm_debugfs_list *debugfs_ent;
-	struct dentry *dent;
-};
-
 /**
  * Info file list entry. This structure represents a debugfs or proc file to
  * be created by the drm core
-- 
1.8.3.1

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

* [PATCH 3/4] drm: Make drm_debugfs_list const
  2013-10-17 18:09 [PATCH 1/4] drm: Constify struct drm_info_list * arguments Damien Lespiau
  2013-10-17 18:09 ` [PATCH 2/4] drm: Remove drm_debugfs_node and drm_debugfs_list Damien Lespiau
@ 2013-10-17 18:09 ` Damien Lespiau
  2013-10-17 18:09 ` [PATCH 4/4] drm/i915: Make the debugfs structures const Damien Lespiau
  2013-10-18 12:40 ` [PATCH 1/4] drm: Constify struct drm_info_list * arguments Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Damien Lespiau @ 2013-10-17 18:09 UTC (permalink / raw)
  To: dri-devel

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/drm_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 4813ff1..b4b51d4 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -42,7 +42,7 @@
  * Initialization, etc.
  **************************************************/
 
-static struct drm_info_list drm_debugfs_list[] = {
+static const struct drm_info_list drm_debugfs_list[] = {
 	{"name", drm_name_info, 0},
 	{"vm", drm_vm_info, 0},
 	{"clients", drm_clients_info, 0},
-- 
1.8.3.1

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

* [PATCH 4/4] drm/i915: Make the debugfs structures const
  2013-10-17 18:09 [PATCH 1/4] drm: Constify struct drm_info_list * arguments Damien Lespiau
  2013-10-17 18:09 ` [PATCH 2/4] drm: Remove drm_debugfs_node and drm_debugfs_list Damien Lespiau
  2013-10-17 18:09 ` [PATCH 3/4] drm: Make drm_debugfs_list const Damien Lespiau
@ 2013-10-17 18:09 ` Damien Lespiau
  2013-10-18 12:40 ` [PATCH 1/4] drm: Constify struct drm_info_list * arguments Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Damien Lespiau @ 2013-10-17 18:09 UTC (permalink / raw)
  To: dri-devel

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ebbb50e..7dac943 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2693,7 +2693,7 @@ static int i915_debugfs_create(struct dentry *root,
 	return drm_add_fake_info_node(minor, ent, fops);
 }
 
-static struct drm_info_list i915_debugfs_list[] = {
+static const struct drm_info_list i915_debugfs_list[] = {
 	{"i915_capabilities", i915_capabilities, 0},
 	{"i915_gem_objects", i915_gem_object_info, 0},
 	{"i915_gem_gtt", i915_gem_gtt_info, 0},
@@ -2735,7 +2735,7 @@ static struct drm_info_list i915_debugfs_list[] = {
 };
 #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
 
-static struct i915_debugfs_files {
+static const struct i915_debugfs_files {
 	const char *name;
 	const struct file_operations *fops;
 } i915_debugfs_files[] = {
-- 
1.8.3.1

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

* Re: [PATCH 1/4] drm: Constify struct drm_info_list * arguments
  2013-10-17 18:09 [PATCH 1/4] drm: Constify struct drm_info_list * arguments Damien Lespiau
                   ` (2 preceding siblings ...)
  2013-10-17 18:09 ` [PATCH 4/4] drm/i915: Make the debugfs structures const Damien Lespiau
@ 2013-10-18 12:40 ` Ville Syrjälä
  3 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2013-10-18 12:40 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: dri-devel

On Thu, Oct 17, 2013 at 07:09:53PM +0100, Damien Lespiau wrote:
> Those functions are just reading data from those pointers.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
for the series.

> ---
>  drivers/gpu/drm/drm_debugfs.c | 4 ++--
>  include/drm/drmP.h            | 9 +++++----
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
> index a05087c..4813ff1 100644
> --- a/drivers/gpu/drm/drm_debugfs.c
> +++ b/drivers/gpu/drm/drm_debugfs.c
> @@ -84,7 +84,7 @@ static const struct file_operations drm_debugfs_fops = {
>   * Create a given set of debugfs files represented by an array of
>   * gdm_debugfs_lists in the given root directory.
>   */
> -int drm_debugfs_create_files(struct drm_info_list *files, int count,
> +int drm_debugfs_create_files(const struct drm_info_list *files, int count,
>  			     struct dentry *root, struct drm_minor *minor)
>  {
>  	struct drm_device *dev = minor->dev;
> @@ -188,7 +188,7 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
>   *
>   * Remove all debugfs entries created by debugfs_init().
>   */
> -int drm_debugfs_remove_files(struct drm_info_list *files, int count,
> +int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
>  			     struct drm_minor *minor)
>  {
>  	struct list_head *pos, *q;
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 2b954ad..c3b659a 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -1470,10 +1470,11 @@ extern struct drm_local_map *drm_getsarea(struct drm_device *dev);
>  #if defined(CONFIG_DEBUG_FS)
>  extern int drm_debugfs_init(struct drm_minor *minor, int minor_id,
>  			    struct dentry *root);
> -extern int drm_debugfs_create_files(struct drm_info_list *files, int count,
> -				    struct dentry *root, struct drm_minor *minor);
> -extern int drm_debugfs_remove_files(struct drm_info_list *files, int count,
> -                                    struct drm_minor *minor);
> +extern int drm_debugfs_create_files(const struct drm_info_list *files,
> +				    int count, struct dentry *root,
> +				    struct drm_minor *minor);
> +extern int drm_debugfs_remove_files(const struct drm_info_list *files,
> +				    int count, struct drm_minor *minor);
>  extern int drm_debugfs_cleanup(struct drm_minor *minor);
>  #endif
>  
> -- 
> 1.8.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC

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

end of thread, other threads:[~2013-10-18 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 18:09 [PATCH 1/4] drm: Constify struct drm_info_list * arguments Damien Lespiau
2013-10-17 18:09 ` [PATCH 2/4] drm: Remove drm_debugfs_node and drm_debugfs_list Damien Lespiau
2013-10-17 18:09 ` [PATCH 3/4] drm: Make drm_debugfs_list const Damien Lespiau
2013-10-17 18:09 ` [PATCH 4/4] drm/i915: Make the debugfs structures const Damien Lespiau
2013-10-18 12:40 ` [PATCH 1/4] drm: Constify struct drm_info_list * arguments Ville Syrjälä

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.