All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <christian@brauner.io>
To: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org, ebiederm@xmission.com,
	gregkh@linuxfoundation.org, mingo@kernel.org,
	james.morris@microsoft.com, keescook@chromium.org,
	peterz@infradead.org, sds@tycho.nsa.gov, viro@zeniv.linux.org.uk,
	akpm@linux-foundation.org
Subject: Re: [PATCH v2 10/17] signal: make has_pending_signals() return bool
Date: Fri, 1 Jun 2018 19:45:53 +0200	[thread overview]
Message-ID: <20180601174553.GB23669@mailbox.org> (raw)
In-Reply-To: <20180601161657.GD1058@redhat.com>

On Fri, Jun 01, 2018 at 06:16:58PM +0200, Oleg Nesterov wrote:
> On 06/01, Christian Brauner wrote:
> >
> > has_pending_signals() already behaves like a boolean function. Let's
> > actually declare it as such too.
> 
> But this patch does more.
> 
> > -	case 4: ready  = signal->sig[3] &~ blocked->sig[3];
> > -		ready |= signal->sig[2] &~ blocked->sig[2];
> > -		ready |= signal->sig[1] &~ blocked->sig[1];
> > -		ready |= signal->sig[0] &~ blocked->sig[0];
> > +	case 4:
> > +		ready = signal->sig[3] & ~blocked->sig[3];
> > +		ready |= signal->sig[2] & ~blocked->sig[2];
> > +		ready |= signal->sig[1] & ~blocked->sig[1];
> > +		ready |= signal->sig[0] & ~blocked->sig[0];
> >  		break;
> 
> Again, personally I do not care at all. But why do you think the code looks
> better after re-formatting? This is subjective, but to me it does not.
> 
> In particular, note the extra space before "=" removed by this patch. I guess
> it was added on purpose, and to me
> 
> 	ready  = signal->sig[3] &~ blocked->sig[3];
> 	ready |= signal->sig[2] &~ blocked->sig[2];
> 
> actually looks better thab
> 
> 	ready = signal->sig[3] &~ blocked->sig[3];
> 	ready |= signal->sig[2] &~ blocked->sig[2];
> 
> after your patch.

I can drop the changes in v3.

Thanks!
Christian

> 
> Oleg.
> 

  reply	other threads:[~2018-06-01 17:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 13:22 [PATCH v1 00/20] signal: refactor some functions Christian Brauner
2018-06-01 13:22 ` [PATCH v2 01/17] signal: make force_sigsegv() void Christian Brauner
2018-06-01 13:22 ` [PATCH v2 02/17] signal: make kill_as_cred_perm() return bool Christian Brauner
2018-06-01 13:22 ` [PATCH v2 03/17] signal: make may_ptrace_stop() " Christian Brauner
2018-06-01 15:56   ` Oleg Nesterov
2018-06-01 16:00     ` Christian Brauner
2018-06-01 13:22 ` [PATCH v2 04/17] signal: make do_sigpending() void Christian Brauner
2018-06-01 16:29   ` Oleg Nesterov
2018-06-01 13:22 ` [PATCH v2 05/17] signal: simplify rt_sigaction() Christian Brauner
2018-06-01 16:04   ` Oleg Nesterov
2018-06-01 13:22 ` [PATCH v2 06/17] signal: make kill_ok_by_cred() return bool Christian Brauner
2018-06-01 13:22 ` [PATCH v2 07/17] signal: make sig_handler_ignored() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 08/17] signal: make sig_task_ignored() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 09/17] signal: make sig_ignored() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 10/17] signal: make has_pending_signals() " Christian Brauner
2018-06-01 16:16   ` Oleg Nesterov
2018-06-01 17:45     ` Christian Brauner [this message]
2018-06-01 13:22 ` [PATCH v2 11/17] signal: make recalc_sigpending_tsk() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 12/17] signal: make unhandled_signal() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 13/17] signal: make flush_sigqueue_mask() void Christian Brauner
2018-06-01 13:22 ` [PATCH v2 14/17] signal: make wants_signal() return bool Christian Brauner
2018-06-01 13:22 ` [PATCH v2 15/17] signal: make legacy_queue() " Christian Brauner
2018-06-01 13:22 ` [PATCH v2 16/17] signal: make security_task_kill() " Christian Brauner
2018-06-01 16:26   ` Oleg Nesterov
2018-06-01 17:45     ` Christian Brauner
2018-06-02  9:31     ` Christian Brauner
2018-06-01 13:22 ` [PATCH v2 17/17] signal: make get_signal() " Christian Brauner

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=20180601174553.GB23669@mailbox.org \
    --to=christian@brauner.io \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.morris@microsoft.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sds@tycho.nsa.gov \
    --cc=viro@zeniv.linux.org.uk \
    /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.