linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes
Date: Sat, 20 Feb 2016 13:36:09 -0800	[thread overview]
Message-ID: <CA+55aFz86ruMJHDeYmUfriWYBkdqaHmcOPHmkTq3DAz4Pukf1g@mail.gmail.com> (raw)
In-Reply-To: <1455892568-22586-2-git-send-email-linus.walleij@linaro.org>

On Fri, Feb 19, 2016 at 6:36 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> This is a duct-tape-and-chewing-gum solution to the problem with
> the major numbers running out when allocating major numbers
> dynamically.

Ugh. This is too ugly to live.

Can't you do something with a simple bitmap, and just pre-allocate the
fixed numbers? Allocate new major numbers using find_next_zero_bit()
or something..

I can't imagine that we couldn't do something prettier in less code
than that too-disgusting-to-live free_majors[] array..

               Linus

  reply	other threads:[~2016-02-20 21:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 14:36 [PATCH 1/2] chrdev: emit a warning when we go below dynamic major range Linus Walleij
2016-02-19 14:36 ` [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes Linus Walleij
2016-02-20 21:36   ` Linus Torvalds [this message]
2016-02-19 16:06 ` [PATCH 1/2] chrdev: emit a warning when we go below dynamic major range Alan Cox
2016-02-19 19:45   ` Linus Walleij

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=CA+55aFz86ruMJHDeYmUfriWYBkdqaHmcOPHmkTq3DAz4Pukf1g@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).