From: Jiri Benc <jbenc@redhat.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>,
<richardcochran@gmail.com>
Subject: Re: [PATCH net-next] ptp: dynamic allocation of PHC char devices
Date: Thu, 11 Apr 2013 11:52:01 +0200 [thread overview]
Message-ID: <20130411115201.2471a94f@griffin> (raw)
In-Reply-To: <1365617559.2581.25.camel@bwh-desktop.uk.solarflarecom.com>
On Wed, 10 Apr 2013 19:12:39 +0100, Ben Hutchings wrote:
> On Wed, 2013-04-10 at 13:49 -0400, David Miller wrote:
> > Can't multiple (unrelated) devices carve out minor space in the same
> > major? Isn't that why it's designed this way?
>
> Only at a level above the core char device functions, e.g.
> misc_register() for singleton devices. Unless I'm very much mistaken,
> when you allocate a char device range and specify major=0 you get a
> dynamically allocated and previously unused major, regardless of how
> many minors you asked for.
You're correct. And thinking about it, I indeed see no reason not to
allocate the full range. We save some memory that way, as each minor
range allocation is tracked by register_chrdev_region, and the code is
going to be simpler.
I'll respin the patch.
Thanks,
Jiri
prev parent reply other threads:[~2013-04-11 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 10:47 [PATCH net-next] ptp: dynamic allocation of PHC char devices Jiri Benc
2013-04-10 17:37 ` Ben Hutchings
2013-04-10 17:49 ` David Miller
2013-04-10 18:12 ` Ben Hutchings
2013-04-11 9:52 ` Jiri Benc [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=20130411115201.2471a94f@griffin \
--to=jbenc@redhat.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/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).