From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>,
Boqun Feng <boqun.feng@gmail.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH] locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
Date: Tue, 10 Sep 2024 11:15:54 +0300 [thread overview]
Message-ID: <ZuAAOmjTGYEFQJPC@smile.fi.intel.com> (raw)
In-Reply-To: <20240909182905.161156-1-longman@redhat.com>
On Mon, Sep 09, 2024 at 02:29:05PM -0400, Waiman Long wrote:
> Both is_rwsem_reader_owned() and rwsem_owner() are currently only used when
> CONFIG_DEBUG_RWSEMS is defined. This causes a compilation error with clang
> when `make W=1` and CONFIG_WERROR=y:
>
> kernel/locking/rwsem.c:187:20: error: unused function 'is_rwsem_reader_owned' [-Werror,-Wunused-function]
> 187 | static inline bool is_rwsem_reader_owned(struct rw_semaphore *sem)
> | ^~~~~~~~~~~~~~~~~~~~~
> kernel/locking/rwsem.c:271:35: error: unused function 'rwsem_owner' [-Werror,-Wunused-function]
> 271 | static inline struct task_struct *rwsem_owner(struct rw_semaphore *sem)
> | ^~~~~~~~~~~
>
> Fix this by moving these two functions under the CONFIG_DEBUG_RWSEMS define.
At least this solves my issue,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-09-10 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 18:29 [PATCH] locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS Waiman Long
2024-09-10 8:15 ` Andy Shevchenko [this message]
2024-09-10 8:16 ` Andy Shevchenko
2024-09-10 15:47 ` Waiman Long
2024-09-10 16:01 ` Andy Shevchenko
2024-09-10 18:04 ` Waiman Long
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=ZuAAOmjTGYEFQJPC@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=boqun.feng@gmail.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox