From: Leonardo Bras <leobras@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Leonardo Bras <leobras@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Oleg Nesterov <oleg@redhat.com>, Mark Brown <broonie@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Guo Hui <guohui@uniontech.com>,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] arm64: remove unnecessary ifdefs around is_compat_task()
Date: Tue, 9 Jan 2024 15:18:28 -0300 [thread overview]
Message-ID: <ZZ2N9D_HH5a-lodI@LeoBras> (raw)
In-Reply-To: <2f2e8df4-d8bb-4eff-8e70-0ac38736bd74@app.fastmail.com>
On Tue, Jan 09, 2024 at 07:18:46AM +0100, Arnd Bergmann wrote:
> On Mon, Jan 8, 2024, at 18:43, Leonardo Bras wrote:
> > Currently some parts of the codebase will test for CONFIG_COMPAT before
> > testing is_compat_task().
> >
> > is_compat_task() is a inlined function only present on CONFIG_COMPAT.
> > On the other hand, for !CONFIG_COMPAT, we have in linux/compat.h:
> >
> > #define is_compat_task() (0)
> >
> > Since we have this define available in every usage of is_compat_task() for
> > !CONFIG_COMPAT, it's unnecessary to keep the ifdefs, since the compiler is
> > smart enough to optimize-out those snippets on CONFIG_COMPAT=n
> >
> > This requires some regset code as well as a few other defines to be made
> > available on !CONFIG_COMPAT, so some symbols can get resolved before
> > getting optimized-out.
> >
> > Signed-off-by: Leonardo Bras <leobras@redhat.com>
> > ---
> > Changes since v1:
> > - Move some regset code and other defines outside of CONFIG_COMPAT
> > - Closes:
> > https://lore.kernel.org/oe-kbuild-all/202401061219.Y2LD7LTx-lkp@intel.com/
> > Link:
> > https://lore.kernel.org/all/20240105041458.126602-3-leobras@redhat.com/
>
> Looks good to me, and did not cause any regressions in an overnight
> randconfig build loop.
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
Thanks!
Leo
prev parent reply other threads:[~2024-01-09 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 17:43 Leonardo Bras
2024-01-09 6:18 ` Arnd Bergmann
2024-01-09 18:18 ` Leonardo Bras [this message]
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=ZZ2N9D_HH5a-lodI@LeoBras \
--to=leobras@redhat.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=ebiederm@xmission.com \
--cc=guohui@uniontech.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=will@kernel.org \
/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