From: Daniel Stodden <daniel.stodden@citrix.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ersek <lersek@redhat.com>,
Laszlo
Subject: Re: [PATCH linux-2.6.18-xen] blktap: make max # of tap devices a module parameter
Date: Thu, 24 Feb 2011 12:10:21 -0800 [thread overview]
Message-ID: <1298578221.19195.31.camel@agari.van.xensource.com> (raw)
In-Reply-To: <4D6697F802000078000338AD@vpn.id2.novell.com>
On Thu, 2011-02-24 at 11:40 -0500, Jan Beulich wrote:
> /*
> * BLKTAP - immediately before the mmap area,
> @@ -511,26 +510,16 @@ blktap_ring_debug(struct blktap *tap, ch
> int __init
> blktap_ring_init(void)
> {
> - dev_t dev = 0;
> int err;
>
> - cdev_init(&blktap_ring_cdev, &blktap_ring_file_operations);
> - blktap_ring_cdev.owner = THIS_MODULE;
> -
> - err = alloc_chrdev_region(&dev, 0, MAX_BLKTAP_DEVICE, "blktap2");
> + err = __register_chrdev(0, 0, MAX_BLKTAP_DEVICE, "blktap2",
> + &blktap_ring_file_operations);
> if (err < 0) {
> BTERR("error registering ring devices: %d\n", err);
> return err;
> }
>
> - err = cdev_add(&blktap_ring_cdev, dev, MAX_BLKTAP_DEVICE);
> - if (err) {
> - BTERR("error adding ring device: %d\n", err);
> - unregister_chrdev_region(dev, MAX_BLKTAP_DEVICE);
> - return err;
> - }
> -
> - blktap_ring_major = MAJOR(dev);
> + blktap_ring_major = err;
> BTINFO("blktap ring major: %d\n", blktap_ring_major);
While you are at it: Feel free to drop init message(s?), too. Blktap is
not boot critical, and there are plenty alternative places to check
presence.
Cheers,
Daniel
next prev parent reply other threads:[~2011-02-24 20:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 14:20 [PATCH linux-2.6.18-xen] blktap: make max # of tap devices a module parameter Laszlo Ersek
2011-02-22 15:49 ` Jan Beulich
2011-02-22 17:34 ` Laszlo Ersek
2011-02-22 17:44 ` Daniel Stodden
2011-02-22 18:08 ` Laszlo Ersek
2011-02-22 18:59 ` Daniel Stodden
2011-02-23 10:38 ` Jan Beulich
2011-02-24 16:40 ` Jan Beulich
2011-02-24 19:59 ` Daniel Stodden
2011-02-24 20:10 ` Daniel Stodden [this message]
2011-02-23 9:42 ` Jan Beulich
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=1298578221.19195.31.camel@agari.van.xensource.com \
--to=daniel.stodden@citrix.com \
--cc=JBeulich@novell.com \
--cc=lersek@redhat.com \
--cc=xen-devel@lists.xensource.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).