The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Bradley Morgan <bradley.morgan@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christian Brauner <brauner@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>,
	Andrea Calabrese <andrea.calabrese@amarulasolutions.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] signal: simplify next_signal()
Date: Wed, 2 Dec 2026 10:40:54 +0100	[thread overview]
Message-ID: <aw_npjc1o6_J7-Kd@redhat.com> (raw)
In-Reply-To: <20261201203145.299191-1-bradley.morgan@linux.dev>

On 12/01, Bradley Morgan wrote:
>
> _NSIG_WORDS is a compile time constant, so the compiler unrolls the
> loop anyway and the switch is just duplicate code. Same thing commit
> b7a8d7589a632 ("kernel: refactor: shorten has_pending_signals")
> removed.

Looks correct at first glance, I'll recheck...

But let me ask... Since you simplify this function anyway, perhaps
__ffs(x) make more sense than ffz(~x) ?

Oleg.


      reply	other threads:[~2026-12-02  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 20:31 [PATCH] signal: simplify next_signal() Bradley Morgan
2026-12-02  9:40 ` Oleg Nesterov [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=aw_npjc1o6_J7-Kd@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrea.calabrese@amarulasolutions.com \
    --cc=bradley.morgan@linux.dev \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@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