Skip to contentSkip to conversation

drivers/gpu/drm/i915/i915_debugfs.c: remove unnecessary casts

PATCH In review H Hartley Sweeten 2 participants 4 messages Jan 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/gpu/drm/i915/i915_debugfs.c: remove unnecessary casts

drivers/gpu/drm/i915/i915_debugfs.c: Remove unnecessary casts.

The struct seq_file 'private' member is a void *, the casts are not needed.

---

drivers/gpu/drm/i915/i915_debugfs.c +10 -10
index 9c9998c..94d8fac 100644
@@ -64,7 +64,7 @@ static const char *get_tiling_flag(struct drm_i915_gem_object *obj_priv)
 
 static int i915_gem_object_list_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	uintptr_t list = (uintptr_t) node->info_ent->data;
 	struct list_head *head;
 	struct drm_device *dev = node->minor->dev;
@@ -123,7 +123,7 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
 
 static int i915_gem_request_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	struct drm_i915_gem_request *gem_request;
@@ -139,7 +139,7 @@ static int i915_gem_request_info(struct seq_file *m, void *data)
 
 static int i915_gem_seqno_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
@@ -158,7 +158,7 @@ static int i915_gem_seqno_info(struct seq_file *m, void *data)
 
 static int i915_interrupt_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
@@ -210,7 +210,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
 
 static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	int i;
@@ -245,7 +245,7 @@ static int i915_gem_fence_regs_info(struct seq_file *m, void *data)
 
 static int i915_hws_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	int i;
@@ -278,7 +278,7 @@ static void i915_dump_pages(struct seq_file *m, struct page **pages, int page_co
 
 static int i915_batchbuffer_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	struct drm_gem_object *obj;
@@ -311,7 +311,7 @@ static int i915_batchbuffer_info(struct seq_file *m, void *data)
 
 static int i915_ringbuffer_data(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	u8 *virt;
@@ -334,7 +334,7 @@ static int i915_ringbuffer_data(struct seq_file *m, void *data)
 
 static int i915_ringbuffer_info(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	unsigned int head, tail;
@@ -352,7 +352,7 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data)
 
 static int i915_error_state(struct seq_file *m, void *unused)
 {
-	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_info_node *node = m->private;
 	struct drm_device *dev = node->minor->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	struct drm_i915_error_state *error;
#1 lore raw
Quoted 7 lines · On Fri, 8 Jan 2010 14:18:01 -0700 H Hartley Sweeten…

drivers/gpu/drm/i915/i915_debugfs.c: Remove unnecessary casts.

The struct seq_file 'private' member is a void *, the casts are not needed.

This one should go to Eric Anholt <[email protected]>, and why not just do a full "drm/i915: remove unnecessary casts" patch all at once? That would probably be easier for Eric.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#2 lore raw
Quoted 8 lines · Jesse Barnes
Quoted 5 lines · On Fri, 8 Jan 2010 14:18:01 -0700 H Hartley Sweeten…

drivers/gpu/drm/i915/i915_debugfs.c: Remove unnecessary casts.

The struct seq_file 'private' member is a void *, the casts are not needed.

Quoted 6 lines
Quoted 2 lines

This one should go to Eric Anholt <[email protected]>, and why not just do a full "drm/i915: remove unnecessary casts" patch all at once? That would probably be easier for Eric.

Yah, I just noticed there are a number of them in drivers/gpu/drm/*.

Can Eric Anholt handle all of them or just the i915 specific ones?

Thanks,
Hartley

#3 lore raw
Quoted 12 lines · On Fri, 8 Jan 2010 16:24:02 -0500 "H Hartley Sweeten"…
Quoted 11 lines · Jesse Barnes
Quoted 7 lines · On Fri, 8 Jan 2010 14:18:01 -0700 H Hartley Sweeten…

drivers/gpu/drm/i915/i915_debugfs.c: Remove unnecessary casts.

The struct seq_file 'private' member is a void *, the casts are not needed.

Quoted 7 lines
Quoted 3 lines

This one should go to Eric Anholt <[email protected]>, and why not just do a full "drm/i915: remove unnecessary casts" patch all at once? That would probably be easier for Eric.

Yah, I just noticed there are a number of them in drivers/gpu/drm/*.

Can Eric Anholt handle all of them or just the i915 specific ones?

Just i915, the rest go through Dave.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center