All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [PATCH] locking/mutex: Remove repeated declaration
Date: Tue, 23 Mar 2021 12:23:56 +0100	[thread overview]
Message-ID: <20210323112356.GC3939639@gmail.com> (raw)
In-Reply-To: <1616461774-18644-1-git-send-email-zhangshaokun@hisilicon.com>


* 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

  parent reply	other threads:[~2021-03-23 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-03-24  2:49   ` Shaokun Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210323112356.GC3939639@gmail.com \
    --to=mingo@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.