i915_MISSING_CASE macro includes the device information in the
backtrace, so we know what device the warnings originate from.

Covert MISSING_CASE calls with i915 specific i915_MISSING_CASE variant
in functions where drm_i915_private struct pointer is readily
available.

The conversion was done automatically with below coccinelle semantic
patch.

@rule1@
identifier func, T;
@@
func(...) {
...
struct drm_i915_private *T = ...;
<...
-MISSING_CASE(
+i915_MISSING_CASE(T,
...)
...>
}

@rule2@
identifier func, T;
@@
func(struct drm_i915_private *T,...) {
<...
-MISSING_CASE(
+i915_MISSING_CASE(T,
...)
...>

}

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharad...@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 491cfbaaa330..58757f529841 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -228,7 +228,8 @@ static void gen6_get_stolen_reserved(struct 
drm_i915_private *i915,
                break;
        default:
                *size = 1024 * 1024;
-               MISSING_CASE(reg_val & GEN6_STOLEN_RESERVED_SIZE_MASK);
+               i915_MISSING_CASE(i915,
+                                 reg_val & GEN6_STOLEN_RESERVED_SIZE_MASK);
        }
 }
 
@@ -247,7 +248,8 @@ static void vlv_get_stolen_reserved(struct drm_i915_private 
*i915,
 
        switch (reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK) {
        default:
-               MISSING_CASE(reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK);
+               i915_MISSING_CASE(i915,
+                                 reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK);
                /* fall through */
        case GEN7_STOLEN_RESERVED_1M:
                *size = 1024 * 1024;
@@ -284,7 +286,8 @@ static void gen7_get_stolen_reserved(struct 
drm_i915_private *i915,
                break;
        default:
                *size = 1024 * 1024;
-               MISSING_CASE(reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK);
+               i915_MISSING_CASE(i915,
+                                 reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK);
        }
 }
 
@@ -317,7 +320,8 @@ static void chv_get_stolen_reserved(struct drm_i915_private 
*i915,
                break;
        default:
                *size = 8 * 1024 * 1024;
-               MISSING_CASE(reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK);
+               i915_MISSING_CASE(i915,
+                                 reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK);
        }
 }
 
@@ -367,7 +371,8 @@ static void icl_get_stolen_reserved(struct drm_i915_private 
*i915,
                break;
        default:
                *size = 8 * 1024 * 1024;
-               MISSING_CASE(reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK);
+               i915_MISSING_CASE(i915,
+                                 reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK);
        }
 }
 
@@ -443,7 +448,7 @@ static int i915_gem_init_stolen(struct drm_i915_private 
*i915)
                                                &reserved_base, &reserved_size);
                break;
        default:
-               MISSING_CASE(INTEL_GEN(i915));
+               i915_MISSING_CASE(i915, INTEL_GEN(i915));
                /* fall-through */
        case 11:
        case 12:
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to