mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* {PATCH 2.5.2-pre11] ps2esdi.c 'MINOR' and 'MKDEV' cleanups
@ 2002-01-11 20:31 Nikita Gergel
  0 siblings, 0 replies; only message in thread
From: Nikita Gergel @ 2002-01-11 20:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

Hello!

I've found some well known compilation bugs in ps2esdi.c.
This patch fixes them.

-- 
Nikita Gergel					System Administrator
Moscow, Russia					YAUZA-Telecom

[-- Attachment #2: ps2esdi.diff --]
[-- Type: application/octet-stream, Size: 1255 bytes --]

diff -urN linux-2.5.2-pre11/drivers/block/ps2esdi.c linux-2.5.2-pre11-patched/drivers/block/ps2esdi.c
--- linux-2.5.2-pre11/drivers/block/ps2esdi.c	Wed Dec 16 23:20:00 2001
+++ linux-2.5.2-pre11-patched/drivers/block/ps2esdi.c	Fri Jan 11 23:11:02 2002
@@ -481,7 +481,7 @@
 	}
 	else if ((CURRENT_DEV < ps2esdi_drives) &&
 	    (CURRENT->sector + CURRENT->current_nr_sectors <=
-	    ps2esdi[MINOR(CURRENT->rq_dev)].nr_sects) &&
+	    ps2esdi[minor(CURRENT->rq_dev)].nr_sects) &&
 	    	CURRENT->flags & REQ_CMD) {
 #if 0
 		printk("%s:got request. device : %d minor : %d command : %d  sector : %ld count : %ld\n",
@@ -510,7 +510,7 @@
 	/* is request is valid */
 	else {
 		printk("Grrr. error. ps2esdi_drives: %d, %lu %lu\n", ps2esdi_drives,
-		       CURRENT->sector, ps2esdi[MINOR(CURRENT->rq_dev)].nr_sects);
+		       CURRENT->sector, ps2esdi[minor(CURRENT->rq_dev)].nr_sects);
 		end_request(FAIL);
 	}
 }
@@ -422,7 +422,7 @@
	blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 128);
 
 	for (i = 0; i < ps2esdi_drives; i++) {
-		register_disk(&ps2esdi_gendisk,MKDEV(MAJOR_NR,i<<6),1<<6,
+		register_disk(&ps2esdi_gendisk,mk_kdev(MAJOR_NR,i<<6),1<<6,
 				&ps2esdi_fops,
 				ps2esdi_info[i].head * ps2esdi_info[i].sect *
 				ps2esdi_info[i].cyl);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-11 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-11 20:31 {PATCH 2.5.2-pre11] ps2esdi.c 'MINOR' and 'MKDEV' cleanups Nikita Gergel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®