linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "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>
Cc: 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, 09 Jan 2024 07:18:46 +0100	[thread overview]
Message-ID: <2f2e8df4-d8bb-4eff-8e70-0ac38736bd74@app.fastmail.com> (raw)
In-Reply-To: <20240108174330.472996-2-leobras@redhat.com>

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>


  reply	other threads:[~2024-01-09  6:19 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 [this message]
2024-01-09 18:18   ` Leonardo Bras

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=2f2e8df4-d8bb-4eff-8e70-0ac38736bd74@app.fastmail.com \
    --to=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=leobras@redhat.com \
    --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