Skip to contentSkip to conversation

drm/i915: intel_overlay_print_error_state() only needed for debugfs

PATCH In review Tobias Doerffel 3 participants 5 messages Aug 25, 2010 – Aug 26, 2010 1 message not in the archive

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

PATCH 1/1 drm/i915: intel_overlay_print_error_state() only needed for debugfs

The function intel_overlay_print_error_state() is called from within i915_error_state() in i915_debufs.c which is only built if CONFIG_DEBUG_FS is set. When building without this option, seq_printf() is not declared in intel_overlay.c and the file fails to compile. Furthermore the whole function is superfluous in this case. Therefore only build it if CONFIG_DEBUG_FS is set.

---
 drivers/gpu/drm/i915/intel_overlay.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/intel_overlay.c +2 -0
index 4f00390..74feb89 100644
@@ -1461,6 +1461,7 @@ err:
 	return NULL;
 }
 
+#ifdef CONFIG_DEBUG_FS
 void
 intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_state *error)
 {
@@ -1513,3 +1514,4 @@ intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_s
 	P(UVSCALEV);
 #undef P
 }
+#endif	/* CONFIG_DEBUG_FS */
Signature · 1 line
1.7.1
#1 lore raw

Am Mittwoch, den 25.08.2010, 23:54 +0200 schrieb Tobias Doerffel:

Quoted 6 lines

The function intel_overlay_print_error_state() is called from within i915_error_state() in i915_debufs.c which is only built if CONFIG_DEBUG_FS is set. When building without this option, seq_printf() is not declared in intel_overlay.c and the file fails to compile. Furthermore the whole function is superfluous in this case. Therefore only build it if CONFIG_DEBUG_FS is set.

Signed-off-by is missing. Please resent as v2.

[…]

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

PATCH 1/1 drm/i915: intel_overlay_print_error_state() only needed for debugfs (v2)

The function intel_overlay_print_error_state() is called from within i915_error_state() in i915_debufs.c which is only built if CONFIG_DEBUG_FS is set. When building without this option, seq_printf() is not declared in intel_overlay.c and the file fails to compile. Furthermore the whole function is superfluous in this case. Therefore only build it if CONFIG_DEBUG_FS is set.

---
 drivers/gpu/drm/i915/intel_overlay.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/intel_overlay.c +2 -0
index 4f00390..74feb89 100644
@@ -1461,6 +1461,7 @@ err:
 	return NULL;
 }
 
+#ifdef CONFIG_DEBUG_FS
 void
 intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_state *error)
 {
@@ -1513,3 +1514,4 @@ intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_s
 	P(UVSCALEV);
 #undef P
 }
+#endif	/* CONFIG_DEBUG_FS */
Signature · 1 line
1.7.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH] drm/i915: intel_overlay_print_error_state() only needed for debugfs (v2)

Hi,

Am Donnerstag, 26. August 2010, um 08:41:13 schrieb Andre Müller:

Quoted 8 lines · Tobias Doerffel
Quoted 7 lines

The function intel_overlay_print_error_state() is called from within i915_error_state() in i915_debufs.c which is only built if CONFIG_DEBUG_FS is set. When building without this option, seq_printf() is not declared in intel_overlay.c and the file fails to compile. Furthermore the whole function is superfluous in this case. Therefore only build it if CONFIG_DEBUG_FS is set.

Quoted 8 lines
Quoted 1 line

You may want to refer to
https://bugzilla.kernel.org/show_bug.cgi?id=16811
in the description.
Andrew Morton has a different fix for the failure applied to -mm, which just adds an (unconditional) #include <linux/seq_file.h>.

Yes, that works as well however the affected function is not required at all without debugfs so we can leave it out completely (like done with all the other functions in i915_debufs.c) and save some bytes.

Regards

Toby

Quoted 27 lines

Regards,
Andre

Quoted 24 lines

---

 drivers/gpu/drm/i915/intel_overlay.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_overlay.c index 4f00390..74feb89 100644

drivers/gpu/drm/i915/intel_overlay.c +1 -0
@@ -1461,6 +1461,7 @@ err:
 	return NULL;
 
 }
 
+#ifdef CONFIG_DEBUG_FS
 
 void

intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_state *error) {

drivers/gpu/drm/i915/intel_overlay.c +0 -0
@@ -1513,3 +1514,4 @@ intel_overlay_print_error_state(struct seq_file *m,

struct intel_overlay_error_s

Quoted 6 lines

drivers/gpu/drm/i915/intel_overlay.c intel_overlay_print_error_state(struct seq_file *m, struct intel_overlay_error_s · line 1517

Quoted 6 lines
drivers/gpu/drm/i915/intel_overlay.c +1 -0
 	P(UVSCALEV);
 
 #undef P
 }
 
+#endif	/* CONFIG_DEBUG_FS */

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [PATCH] drm/i915: intel_overlay_print_error_state() only needed for debugfs (v2)

In reply to Tobias Doerffel
Quoted 8 lines · Tobias Doerffel

The function intel_overlay_print_error_state() is called from within i915_error_state() in i915_debufs.c which is only built if CONFIG_DEBUG_FS is set. When building without this option, seq_printf() is not declared in intel_overlay.c and the file fails to compile. Furthermore the whole function is superfluous in this case. Therefore only build it if CONFIG_DEBUG_FS is set.

I've already posted a better patch to remove the compile warnings as well.

The simple inclusion of seq_file.h is the best patch to go into mainline atm, with the more complete patch coming in via drm-intel-next.

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre