[Intel-gfx] [PATCH v3 5/5] drm/i915: Rename global i915 to i915_params

Michal Wajdeczko michal.wajdeczko at intel.com
Thu Sep 14 15:08:05 UTC 2017


Our global struct with params is named exactly the same way
as new preferred name for the drm_i915_private function parameter.

To avoid such name reuse and allow further cleanup of deprecated
dev_priv lets use different name for the global.

v2: rebased
v3: rebased

Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Ville Syrjala <ville.syrjala at intel.com>
---
 drivers/gpu/drm/i915/i915_gpu_error.c |  2 +-
 drivers/gpu/drm/i915/i915_params.c    |  6 +++---
 drivers/gpu/drm/i915/i915_params.h    | 12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 96ca526..4c1f925 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1696,7 +1696,7 @@ static int capture(void *data)
 		ktime_to_timeval(ktime_sub(ktime_get(),
 					   error->i915->gt.last_init_time));
 
-	error->params = i915;
+	error->params = i915_params;
 #define DUP(T, x) dup_param(#T, &error->params.x);
 	I915_PARAMS_FOR_EACH(DUP);
 #undef DUP
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index ddda513..db2ee43 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -26,13 +26,13 @@
 #include "i915_drv.h"
 
 #define i915_param_named(name, T, perm, desc) \
-	module_param_named(name, i915.name, T, perm); \
+	module_param_named(name, i915_params.name, T, perm); \
 	MODULE_PARM_DESC(name, desc)
 #define i915_param_named_unsafe(name, T, perm, desc) \
-	module_param_named_unsafe(name, i915.name, T, perm); \
+	module_param_named_unsafe(name, i915_params.name, T, perm); \
 	MODULE_PARM_DESC(name, desc)
 
-struct i915_params i915 __read_mostly = {
+struct i915_params i915_params __read_mostly = {
 	.modeset = -1,
 	.panel_ignore_lid = 1,
 	.semaphores = -1,
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index ca4ea0f..743fc39 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -76,13 +76,13 @@ struct i915_params {
 };
 #undef MEMBER
 
-extern struct i915_params i915 __read_mostly;
+extern struct i915_params i915_params __read_mostly;
 
-#define i915_param(n)		({ i915.n; })
-#define i915_param_set(n,e)	({ i915.n = e; })
-#define i915_param_inc(n)	({ i915.n++; })
-#define i915_param_dec(n)	({ i915.n--; })
-#define i915_param_ptr(n)	({ &i915.n; })
+#define i915_param(n)		({ i915_params.n; })
+#define i915_param_set(n,e)	({ i915_params.n = e; })
+#define i915_param_inc(n)	({ i915_params.n++; })
+#define i915_param_dec(n)	({ i915_params.n--; })
+#define i915_param_ptr(n)	({ &i915_params.n; })
 
 #endif
 
-- 
2.7.4



More information about the Intel-gfx mailing list