diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-02-07 14:40:23 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-02-08 12:54:05 +0200 |
commit | aae4f817b8176c0232fb1cde491da6d0775bed14 (patch) | |
tree | 2d692cb9ee14a8552d713e0571abea6a7e24e4a6 /drivers | |
parent | fec37500cf1bca65934c60b03f0409328e60ab7b (diff) | |
download | linux-stable-aae4f817b8176c0232fb1cde491da6d0775bed14.tar.gz linux-stable-aae4f817b8176c0232fb1cde491da6d0775bed14.tar.bz2 linux-stable-aae4f817b8176c0232fb1cde491da6d0775bed14.zip |
drm/i915/gt: add sparse lock annotation to avoid warnings
Annotate intel_gt_mcr_lock() and intel_gt_mcr_unlock() to fix sparse
warnings:
drivers/gpu/drm/i915/gt/intel_gt_mcr.c:397:9: warning: context imbalance in 'intel_gt_mcr_lock' - wrong count at exit
drivers/gpu/drm/i915/gt/intel_gt_mcr.c:412:6: warning: context imbalance in 'intel_gt_mcr_unlock' - unexpected unlock
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230207124026.2105442-1-jani.nikula@intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c index 169393a7ad88..a4a8b8bc5737 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c @@ -364,6 +364,7 @@ static u32 rw_with_mcr_steering(struct intel_gt *gt, * function call. */ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags) + __acquires(>->mcr_lock) { unsigned long __flags; int err = 0; @@ -410,6 +411,7 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags) * Context: Releases gt->mcr_lock */ void intel_gt_mcr_unlock(struct intel_gt *gt, unsigned long flags) + __releases(>->mcr_lock) { spin_unlock_irqrestore(>->mcr_lock, flags); |