Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338797

Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes
Date 2016-02-20 22:40 +0100
Message-ID <r4npU-3y0-3@gated-at.bofh.it> (permalink)
References <r3UnU-6pv-27@gated-at.bofh.it> <r3UnV-6pv-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] chrdev: emit a warning when we go below dynamic major range Linus Walleij <linus.walleij@linaro.org> - 2016-02-19 15:40 +0100
  [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes Linus Walleij <linus.walleij@linaro.org> - 2016-02-19 15:40 +0100
    Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-20 22:40 +0100
  Re: [PATCH 1/2] chrdev: emit a warning when we go below dynamic  major range Alan Cox <alan@linux.intel.com> - 2016-02-19 17:10 +0100
    Re: [PATCH 1/2] chrdev: emit a warning when we go below dynamic major range Linus Walleij <linus.walleij@linaro.org> - 2016-02-19 20:50 +0100

csiph-web