From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Jiri Slaby <jslaby@suse.cz>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] tty: vt, remove reduntant check
Date: Thu, 31 Mar 2016 15:25:27 +0100 [thread overview]
Message-ID: <20160331152527.4beefda9@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1459411697-26019-1-git-send-email-jslaby@suse.cz>
On Thu, 31 Mar 2016 10:08:14 +0200
Jiri Slaby <jslaby@suse.cz> wrote:
> MAX_NR_CONSOLES and MAX_NR_USER_CONSOLES are both 63 since they were
> introduced in 1.1.54. And since vc_allocate does:
>
> if (currcons >= MAX_NR_CONSOLES)
> return -ENXIO;
>
> if (!vc_cons[currcons].d) {
> if (currcons >= MAX_NR_USER_CONSOLES && !capable(CAP_SYS_RESOURCE))
> return -EPERM;
> }
>
> the second check is pointless. Remove both the check and the macro
> MAX_NR_USER_CONSOLES.
Actually going back over that ignore the NAK - they change both MAX_NR
and MAX_NR_USER so the assertion is still true.
Alan
prev parent reply other threads:[~2016-03-31 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 8:08 Jiri Slaby
2016-03-31 8:08 ` [PATCH 2/4] tty: vt, get rid of weird source code flow Jiri Slaby
2016-03-31 8:08 ` [PATCH 3/4] tty: vt, make color_table const Jiri Slaby
2016-03-31 8:08 ` [PATCH 4/4] tty: vt, use proper type for default colors Jiri Slaby
2016-03-31 14:23 ` [PATCH 1/4] tty: vt, remove reduntant check One Thousand Gnomes
2016-03-31 14:25 ` One Thousand Gnomes [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=20160331152527.4beefda9@lxorguk.ukuu.org.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.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
all inboxes | Powered by JetHome®