]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/display/sdvo: Make WARN* drm specific where drm_priv ptr is available
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Tue, 28 Jan 2020 18:15:59 +0000 (23:45 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 4 Feb 2020 08:53:17 +0000 (10:53 +0200)
commitb4329a01411eb2350edaf811acc39113524a304d
tree6e3d08c3e95a4a834093ec50968b659a5a63f9f2
parent16c56083c0cb608a818879f6a833f268c34c1bdc
drm/i915/display/sdvo: Make WARN* drm specific where drm_priv ptr is available

drm specific WARN* calls include device information in the
backtrace, so we know what device the warnings originate from.

Covert all the calls of WARN* with device specific drm_WARN*
variants 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 = ...;
<+...
(
-WARN(
+drm_WARN(&T->drm,
...)
|
-WARN_ON(
+drm_WARN_ON(&T->drm,
...)
|
-WARN_ONCE(
+drm_WARN_ONCE(&T->drm,
...)
|
-WARN_ON_ONCE(
+drm_WARN_ON_ONCE(&T->drm,
...)
)
...+>
}

@rule2@
identifier func, T;
@@
func(struct drm_i915_private *T,...) {
<+...
(
-WARN(
+drm_WARN(&T->drm,
...)
|
-WARN_ON(
+drm_WARN_ON(&T->drm,
...)
|
-WARN_ONCE(
+drm_WARN_ONCE(&T->drm,
...)
|
-WARN_ON_ONCE(
+drm_WARN_ON_ONCE(&T->drm,
...)
)
...+>
}

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200128181603.27767-18-pankaj.laxminarayan.bharadiya@intel.com
drivers/gpu/drm/i915/display/intel_sdvo.c