diff options
| author | Pankaj Bharadiya <[email protected]> | 2020-05-04 23:45:59 +0530 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2020-05-19 16:01:37 +0300 |
| commit | 19edeb388e9f5a0ba505bbf53059dc5a856a0c77 (patch) | |
| tree | 52bef23f1e17bc9f1a974aea8c5965228fab5147 /tools/perf/scripts/python | |
| parent | bf07f6ebffefce2bbf3c318f9ce2f987774ea983 (diff) | |
drm/i915/pm: Prefer drm_WARN_ON over WARN_ON
struct drm_device specific drm_WARN* macros include device information
in the backtrace, so we know what device the warnings originate from.
Prefer drm_WARN_ON over WARN_ON.
Conversion is done with below sementic patch:
@@
identifier func, T;
@@
func(...) {
...
struct intel_crtc *T = ...;
+struct drm_i915_private *dev_priv = to_i915(T->base.dev);
<+...
-WARN_ON(
+drm_WARN_ON(&dev_priv->drm,
...)
...+>
}
@@
identifier func, T;
@@
func(struct intel_crtc_state *T,...) {
+struct drm_i915_private *dev_priv = to_i915(T->uapi.crtc->dev);
<+...
-WARN_ON(
+drm_WARN_ON(&dev_priv->drm,
...)
...+>
}
changes since v1:
- Added dev_priv local variable and used it in drm_WARN_ON calls (Jani)
Signed-off-by: Pankaj Bharadiya <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions