]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/fbdev: Make WARN* drm specific where drm_device ptr is available
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Tue, 28 Jan 2020 18:15:53 +0000 (23:45 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 4 Feb 2020 08:46:56 +0000 (10:46 +0200)
commitfac192b5b983b15e21cf3d81144c7ab2c5a6ca94
tree0ea94c03df929caece2bd1d2b617ef70515ab3d9
parent9f68610b9ceab9381fcf724ce82777571d9f0fe2
drm/i915/fbdev: Make WARN* drm specific where drm_device ptr is available

Drm specific drm_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_device struct pointer is readily
available.

The conversion was done automatically with below coccinelle semantic
patch. checkpatch errors/warnings are fixed manually.

@rule1@
identifier func, T;
@@
func(...) {
...
struct drm_device *T = ...;
<...
(
-WARN(
+drm_WARN(T,
...)
|
-WARN_ON(
+drm_WARN_ON(T,
...)
|
-WARN_ONCE(
+drm_WARN_ONCE(T,
...)
|
-WARN_ON_ONCE(
+drm_WARN_ON_ONCE(T,
...)
)
...>
}

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

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-12-pankaj.laxminarayan.bharadiya@intel.com
drivers/gpu/drm/i915/display/intel_fbdev.c