* [PATCH] locking/mutex: Remove repeated declaration
@ 2021-03-23 1:09 Shaokun Zhang
2021-03-23 1:39 ` Waiman Long
2021-03-23 11:23 ` Ingo Molnar
0 siblings, 2 replies; 4+ messages in thread
From: Shaokun Zhang @ 2021-03-23 1:09 UTC (permalink / raw)
To: linux-kernel
Cc: Shaokun Zhang, Peter Zijlstra, Ingo Molnar, Will Deacon,
Waiman Long, Boqun Feng
Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster")
introduces 'struct ww_acquire_ctx' again, remove the repeated declaration.
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
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:
*
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] locking/mutex: Remove repeated declaration
2021-03-23 1:09 [PATCH] locking/mutex: Remove repeated declaration Shaokun Zhang
@ 2021-03-23 1:39 ` Waiman Long
2021-03-23 11:23 ` Ingo Molnar
1 sibling, 0 replies; 4+ messages in thread
From: Waiman Long @ 2021-03-23 1:39 UTC (permalink / raw)
To: Shaokun Zhang, linux-kernel
Cc: Peter Zijlstra, Ingo Molnar, Will Deacon, Boqun Feng
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@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Waiman Long <longman@redhat.com>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
> 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@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] locking/mutex: Remove repeated declaration
2021-03-23 1:09 [PATCH] locking/mutex: Remove repeated declaration Shaokun Zhang
2021-03-23 1:39 ` Waiman Long
@ 2021-03-23 11:23 ` Ingo Molnar
2021-03-24 2:49 ` Shaokun Zhang
1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2021-03-23 11:23 UTC (permalink / raw)
To: Shaokun Zhang
Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, Will Deacon,
Waiman Long, Boqun Feng
* Shaokun Zhang <zhangshaokun@hisilicon.com> wrote:
> Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster")
> introduces 'struct ww_acquire_ctx' again, remove the repeated declaration.
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Waiman Long <longman@redhat.com>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
> 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:
> *
Please also group the pre-declarations together, that's the canonical
pattern we use in headers.
I.e. have something like this at the top:
struct ww_class;
struct ww_acquire_ctx;
Thanks,
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] locking/mutex: Remove repeated declaration
2021-03-23 11:23 ` Ingo Molnar
@ 2021-03-24 2:49 ` Shaokun Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Shaokun Zhang @ 2021-03-24 2:49 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, Will Deacon,
Waiman Long, Boqun Feng
Hi Ingo,
On 2021/3/23 19:23, Ingo Molnar wrote:
>
> * Shaokun Zhang <zhangshaokun@hisilicon.com> wrote:
>
>> Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster")
>> introduces 'struct ww_acquire_ctx' again, remove the repeated declaration.
>>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Waiman Long <longman@redhat.com>
>> Cc: Boqun Feng <boqun.feng@gmail.com>
>> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
>> ---
>> 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:
>> *
>
> Please also group the pre-declarations together, that's the canonical
> pattern we use in headers.
Ok,
>
> I.e. have something like this at the top:
>
Got it, I will do it in next version.
Thanks,
Shaokun
> struct ww_class;
> struct ww_acquire_ctx;
>
> Thanks,
>
> Ingo
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-24 2:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 1:09 [PATCH] locking/mutex: Remove repeated declaration Shaokun Zhang
2021-03-23 1:39 ` Waiman Long
2021-03-23 11:23 ` Ingo Molnar
2021-03-24 2:49 ` Shaokun Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).