* [FWD: Bug in drivers/block/paride/pd.c] @ 2003-08-12 0:34 A1tmblwd 2003-08-12 2:06 ` [PATCH] " viro 0 siblings, 1 reply; 2+ messages in thread From: A1tmblwd @ 2003-08-12 0:34 UTC (permalink / raw) To: linux-kernel [-- Attachment #1: Type: text/plain, Size: 594 bytes --] Hi, I sent this message to the original author; however, I am not certain that he is maintaining the code or is reachable at the address provided. Please forward to the appropriate party. Regards, Kam Leo __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 [-- Attachment #2: Forwarded Msg --] [-- Type: message/rfc822, Size: 1189 bytes --] From: A1tmblwd To: grant@torque.net Subject: Bug in pd.c Date: Mon, 11 Aug 2003 20:20:07 -0400 Message-ID: <0376B263.4850C348.005FFA64@netscape.net> Hi, Grant. I encountered the follwoing bug when compiling the linux-2.6.0.test3 release with patch-2.6.0.test3-bk1 applied: drivers/block/paride/pd.c: In function `pd_init': drivers/block/paride/pd.c:896: warning: passing arg 1 of `blk_init_queue' from incompatible pointer type drivers/block/paride/pd.c:896: warning: passing arg 2 of `blk_init_queue' from incompatible pointer type drivers/block/paride/pd.c:896: error: too many arguments to function `blk_init_queue' Regards, Kam Leo __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Re: [FWD: Bug in drivers/block/paride/pd.c] 2003-08-12 0:34 [FWD: Bug in drivers/block/paride/pd.c] A1tmblwd @ 2003-08-12 2:06 ` viro 0 siblings, 0 replies; 2+ messages in thread From: viro @ 2003-08-12 2:06 UTC (permalink / raw) To: Linus Torvalds; +Cc: linux-kernel On Mon, Aug 11, 2003 at 08:34:49PM -0400, A1tmblwd@netscape.net wrote: > Hi, I sent this message to the original author; however, I am not certain that he is maintaining the code or is reachable at the address provided. Please forward to the appropriate party. diff -urN B3-imajor/drivers/block/paride/pd.c B3-pd/drivers/block/paride/pd.c --- B3-imajor/drivers/block/paride/pd.c Mon Jul 28 11:13:03 2003 +++ B3-pd/drivers/block/paride/pd.c Mon Aug 11 17:11:49 2003 @@ -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); } @@ -890,20 +890,30 @@ { if (disable) return -1; - 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 out1; + + blk_queue_max_sectors(pd_queue, cluster); + + if (register_blkdev(major, name)) + goto out2; 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()) { - unregister_blkdev(major, name); - return -1; - } + if (!pd_detect()) + goto out3; + return 0; + +out3: + unregister_blkdev(major, name); +out2: + blk_cleanup_queue(pd_queue); +out1: + return -1; } static void __exit pd_exit(void) @@ -920,7 +930,7 @@ pi_release(disk->pi); } } - blk_cleanup_queue(&pd_queue); + blk_cleanup_queue(pd_queue); } MODULE_LICENSE("GPL"); ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-12 2:06 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-08-12 0:34 [FWD: Bug in drivers/block/paride/pd.c] A1tmblwd 2003-08-12 2:06 ` [PATCH] " viro
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox