mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Gergel <fc@yauza.ru>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: {PATCH 2.5.2-pre11] ps2esdi.c 'MINOR' and 'MKDEV' cleanups
Date: Fri, 11 Jan 2002 23:31:07 +0300	[thread overview]
Message-ID: <20020111233107.6a08df3c.fc@yauza.ru> (raw)

[-- 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);

                 reply	other threads:[~2002-01-11 20:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020111233107.6a08df3c.fc@yauza.ru \
    --to=fc@yauza.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®