Re: [PATCH] locking/mutex: Remove repeated declaration

From: Waiman Long
Date: Mon Mar 22 2021 - 21:40:03 EST


On 3/22/21 9:09 PM, Shaokun Zhang wrote:
Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster")
introduces 'struct ww_acquire_ctx' again, remove the repeated declaration.

Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>
Signed-off-by: Shaokun Zhang <zhangshaokun@xxxxxxxxxxxxx>
---
include/linux/mutex.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 0cd631a19727..d80c0e22c822 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -20,8 +20,6 @@
#include <linux/osq_lock.h>
#include <linux/debug_locks.h>
-struct ww_acquire_ctx;
-
/*
* Simple, straightforward mutexes with strict semantics:
*

Yes, it is duplicated.

Acked-by: Waiman Long <longman@xxxxxxxxxx>