[Intel-gfx,06/10] drm/i915/display/hdmi: Make MISSING_CASE backtrace i915 specific
diff mbox series

Message ID 20200225134709.6153-7-pankaj.laxminarayan.bharadiya@intel.com
State New
Headers show
Series
  • drm/i915: Introduce i915 based i915_MISSING_CASE macro and us it in i915
Related show

Commit Message

Pankaj Bharadiya Feb. 25, 2020, 1:47 p.m. UTC
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.bharadiya@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index bdbb5ce3fa81..59148134a97b 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -188,7 +188,7 @@  hsw_dip_data_reg(struct drm_i915_private *dev_priv,
 	case HDMI_INFOFRAME_TYPE_DRM:
 		return GLK_TVIDEO_DIP_DRM_DATA(cpu_transcoder, i);
 	default:
-		MISSING_CASE(type);
+		i915_MISSING_CASE(dev_priv, type);
 		return INVALID_MMIO_REG;
 	}
 }
@@ -2952,7 +2952,7 @@  static u8 chv_port_to_ddc_pin(struct drm_i915_private *dev_priv, enum port port)
 		ddc_pin = GMBUS_PIN_DPD_CHV;
 		break;
 	default:
-		MISSING_CASE(port);
+		i915_MISSING_CASE(dev_priv, port);
 		ddc_pin = GMBUS_PIN_DPB;
 		break;
 	}
@@ -2971,7 +2971,7 @@  static u8 bxt_port_to_ddc_pin(struct drm_i915_private *dev_priv, enum port port)
 		ddc_pin = GMBUS_PIN_2_BXT;
 		break;
 	default:
-		MISSING_CASE(port);
+		i915_MISSING_CASE(dev_priv, port);
 		ddc_pin = GMBUS_PIN_1_BXT;
 		break;
 	}
@@ -2997,7 +2997,7 @@  static u8 cnp_port_to_ddc_pin(struct drm_i915_private *dev_priv,
 		ddc_pin = GMBUS_PIN_3_BXT;
 		break;
 	default:
-		MISSING_CASE(port);
+		i915_MISSING_CASE(dev_priv, port);
 		ddc_pin = GMBUS_PIN_1_BXT;
 		break;
 	}
@@ -3033,7 +3033,7 @@  static u8 mcc_port_to_ddc_pin(struct drm_i915_private *dev_priv, enum port port)
 		ddc_pin = GMBUS_PIN_9_TC1_ICP;
 		break;
 	default:
-		MISSING_CASE(phy);
+		i915_MISSING_CASE(dev_priv, phy);
 		ddc_pin = GMBUS_PIN_1_BXT;
 		break;
 	}
@@ -3056,7 +3056,7 @@  static u8 g4x_port_to_ddc_pin(struct drm_i915_private *dev_priv,
 		ddc_pin = GMBUS_PIN_DPD;
 		break;
 	default:
-		MISSING_CASE(port);
+		i915_MISSING_CASE(dev_priv, port);
 		ddc_pin = GMBUS_PIN_DPB;
 		break;
 	}