diff mbox series

drm/i915/gem: use spinlock_t instead of struct spinlock

Message ID 20200217184219.15325-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/gem: use spinlock_t instead of struct spinlock | expand

Commit Message

Jani Nikula Feb. 17, 2020, 6:42 p.m. UTC
spinlock_t is one case where the typedef is to be preferred over struct
spinlock.

Fixes: 42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Feb. 17, 2020, 8:26 p.m. UTC | #1
Quoting Jani Nikula (2020-02-17 18:42:19)
> spinlock_t is one case where the typedef is to be preferred over struct
> spinlock.
> 
> Fixes: 42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

If you say so,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

If you look you might find a few more I've added ;)
-Chris
Jani Nikula Feb. 18, 2020, 7:46 a.m. UTC | #2
On Mon, 17 Feb 2020, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2020-02-17 18:42:19)
>> spinlock_t is one case where the typedef is to be preferred over struct
>> spinlock.
>> 
>> Fixes: 42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> If you say so,

Checkpatch and a git grep popularity contest in the kernel tree say
so...

> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks!

> If you look you might find a few more I've added ;)

Oh? My git grep fails me then.

BR,
Jani.
Jani Nikula Feb. 19, 2020, 1:14 p.m. UTC | #3
On Tue, 18 Feb 2020, Jani Nikula <jani.nikula@intel.com> wrote:
> On Mon, 17 Feb 2020, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> Quoting Jani Nikula (2020-02-17 18:42:19)
>>> spinlock_t is one case where the typedef is to be preferred over struct
>>> spinlock.
>>> 
>>> Fixes: 42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> If you say so,
>
> Checkpatch and a git grep popularity contest in the kernel tree say
> so...
>
>> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Thanks!

And pushed.

BR,
Jani.


>
>> If you look you might find a few more I've added ;)
>
> Oh? My git grep fails me then.
>
> BR,
> Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
index b9a1d54a4643..28760bd03265 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
@@ -181,7 +181,7 @@  struct i915_gem_context {
 	char name[TASK_COMM_LEN + 8];
 
 	struct {
-		struct spinlock lock;
+		spinlock_t lock;
 		struct list_head engines;
 	} stale;
 };