Skip to contentSkip to conversation

drm/i915: static inline for dummy crc functions

PATCH New Daniel Vetter 1 participant 2 messages Oct 16, 2013

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

PATCH 1/2 drm/i915: static inline for dummy crc functions

Also use #ifdef to keep consistent with all other such cases.

---
 drivers/gpu/drm/i915/i915_drv.h | 4 ++--
 drivers/gpu/drm/i915/i915_irq.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -2
index 9aeddc0..b39a548 100644
@@ -2235,10 +2235,10 @@ int i915_verify_lists(struct drm_device *dev);
 /* i915_debugfs.c */
 int i915_debugfs_init(struct drm_minor *minor);
 void i915_debugfs_cleanup(struct drm_minor *minor);
-#if defined(CONFIG_DEBUG_FS)
+#ifdef CONFIG_DEBUG_FS
 void intel_display_crc_init(struct drm_device *dev);
 #else
-void intel_display_crc_init(struct drm_device *dev) {}
+static inline void intel_display_crc_init(struct drm_device *dev) {}
 #endif
 
 /* i915_gpu_error.c */
drivers/gpu/drm/i915/i915_irq.c +1 -1
index b2be057..8c9148c 100644
@@ -1225,7 +1225,7 @@ static void ivb_pipe_crc_update(struct drm_device *dev, enum pipe pipe)
 	wake_up_interruptible(&pipe_crc->wq);
 }
 #else
-static void ivb_pipe_crc_update(struct drm_device *dev, int pipe) {}
+static inline void ivb_pipe_crc_update(struct drm_device *dev, int pipe) {}
 #endif
 
 /* The RPS events need forcewake, so we add them to a work queue and mask their
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 2/2 drm/i915: constify harder

We not only want const strings, but a const array of them. Reported by checkpatch.pl

---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +2 -2
index d1674b6..5fce5d8 100644
@@ -1909,7 +1909,7 @@ static int i915_pipe_crc_create(struct dentry *root, struct drm_minor *minor,
 	return drm_add_fake_info_node(minor, ent, info);
 }
 
-static const char *pipe_crc_sources[] = {
+static const char * const pipe_crc_sources[] = {
 	"none",
 	"plane1",
 	"plane2",
@@ -2054,7 +2054,7 @@ enum intel_pipe_crc_object {
 	PIPE_CRC_OBJECT_PIPE,
 };
 
-static const char *pipe_crc_objects[] = {
+static const char * const pipe_crc_objects[] = {
 	"pipe",
 };
 
Signature · 1 line
1.8.4.rc3