From: Vinay K Nallamothu <vinay-rc@naturesoft.net>
To: Nick Piggin <piggin@cyberone.com.au>, Jens Axboe <axboe@suse.de>
Cc: trivial@rustcorp.com.au, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.6.0-test3] compile fix for driver/block/paride/pd.c
Date: 09 Aug 2003 16:03:43 +0530 [thread overview]
Message-ID: <1060425223.1276.22.camel@lima.royalchallenge.com> (raw)
In-Reply-To: <3F34BEC4.8090701@cyberone.com.au>
Hi Nick,
On Sat, 2003-08-09 at 14:58, Nick Piggin wrote:
> blk_init_queue now returns a request queue, so this
> patch will not work properly. See the changes in
> test2 -> test3 for how to do it correctly.
Thanks for pointing out. Here is the one with proper fixes. Compiles
fine though not tested.
This patch modifies the code to use the new blk_init_queue.
pd.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff -urN linux-2.6.0-test3/drivers/block/paride/pd.c linux-2.6.0-test3-nvk/drivers/block/paride/pd.c
--- linux-2.6.0-test3/drivers/block/paride/pd.c 2003-07-28 10:43:52.000000000 +0530
+++ linux-2.6.0-test3-nvk/drivers/block/paride/pd.c 2003-08-09 15:58:56.000000000 +0530
@@ -654,7 +654,7 @@
return pd_identify(disk);
}
-static struct request_queue pd_queue;
+static struct request_queue* pd_queue;
static int pd_detect(void)
{
@@ -704,7 +704,7 @@
set_capacity(p, disk->capacity);
disk->gd = p;
p->private_data = disk;
- p->queue = &pd_queue;
+ p->queue = pd_queue;
add_disk(p);
}
}
@@ -782,7 +782,7 @@
spin_lock_irqsave(&pd_lock, saved_flags);
end_request(pd_req, success);
pd_busy = 0;
- do_pd_request(&pd_queue);
+ do_pd_request(pd_queue);
spin_unlock_irqrestore(&pd_lock, saved_flags);
}
@@ -893,13 +893,18 @@
if (register_blkdev(major, name))
return -1;
- blk_init_queue(&pd_queue, do_pd_request, &pd_lock);
- blk_queue_max_sectors(&pd_queue, cluster);
+ pd_queue = blk_init_queue(do_pd_request, &pd_lock);
+ if (!pd_queue)
+ goto error;
+
+ blk_queue_max_sectors(pd_queue, cluster);
printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
name, name, PD_VERSION, major, cluster, nice);
pd_init_units();
if (!pd_detect()) {
+ blk_put_queue(pd_queue);
+error:
unregister_blkdev(major, name);
return -1;
}
@@ -920,7 +925,7 @@
pi_release(disk->pi);
}
}
- blk_cleanup_queue(&pd_queue);
+ blk_put_queue(pd_queue);
}
MODULE_LICENSE("GPL");
prev parent reply other threads:[~2003-08-09 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-09 9:39 [PATCH 2.6.0-test3] compile fix for driver/block/paride/pd.c Vinay K Nallamothu
2003-08-09 9:28 ` Nick Piggin
2003-08-09 10:33 ` Vinay K Nallamothu [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=1060425223.1276.22.camel@lima.royalchallenge.com \
--to=vinay-rc@naturesoft.net \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=piggin@cyberone.com.au \
--cc=trivial@rustcorp.com.au \
/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