All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@home.nl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: drivers/md compile fixes.
Date: Sun, 06 Jan 2002 14:01:11 +0100	[thread overview]
Message-ID: <3C384A97.8090909@home.nl> (raw)

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

Hi,

The attached patch to 2.5.2-pre9 is necessary to get it to compile and
to clean up some NODEV vs. mk_kdev(0, 0) usages.

-- 
	Best regards/MvG,

		Gertjan

----------

Gertjan van Wingerde
Geessinkweg 177
7544 TX Enschede
The Netherlands
E-mail: gwingerde@home.nl

[-- Attachment #2: linux-md.diff --]
[-- Type: text/plain, Size: 1409 bytes --]

diff -u --recursive linux-2.5.2-pre8/drivers/md/md.c linux-2.5.x/drivers/md/md.c
--- linux-2.5.2-pre8/drivers/md/md.c	Sun Jan  6 11:28:53 2002
+++ linux-2.5.x/drivers/md/md.c	Sun Jan  6 11:30:03 2002
@@ -641,7 +641,7 @@
 	int err = 0;
 	struct block_device *bdev;
 
-	bdev = bdget(rdev->dev);
+	bdev = bdget(kdev_t_to_nr(rdev->dev));
 	if (!bdev)
 		return -ENOMEM;
 	err = blkdev_get(bdev, FMODE_READ|FMODE_WRITE, 0, BDEV_RAW);
@@ -1132,7 +1132,7 @@
 						rdev->sb->this_disk.minor);
 			rdev->desc_nr = rdev->sb->this_disk.number;
 		} else {
-			rdev->old_dev = NODEV;
+			rdev->old_dev = mk_kdev(0, 0);
 			rdev->desc_nr = -1;
 		}
 	}
diff -u --recursive linux-2.5.2-pre8/drivers/md/raid1.c linux-2.5.x/drivers/md/raid1.c
--- linux-2.5.2-pre8/drivers/md/raid1.c	Sun Jan  6 11:28:53 2002
+++ linux-2.5.x/drivers/md/raid1.c	Fri Jan  4 21:53:52 2002
@@ -853,7 +853,7 @@
 
 		*d = failed_desc;
 
-		if (kdev_none(sdisk->dev))
+		if (kdev_same(sdisk->dev, mk_kdev(0,0)))
 			sdisk->used_slot = 0;
 		/*
 		 * this really activates the spare.
@@ -879,7 +879,7 @@
 			err = 1;
 			goto abort;
 		}
-		rdisk->dev = NODEV;
+		rdisk->dev = mk_kdev(0,0);
 		rdisk->used_slot = 0;
 		conf->nr_disks--;
 		break;
@@ -1428,7 +1428,7 @@
 
 			disk->number = descriptor->number;
 			disk->raid_disk = disk_idx;
-			disk->dev = NODEV;
+			disk->dev = mk_kdev(0,0);
 
 			disk->operational = 0;
 			disk->write_only = 0;

             reply	other threads:[~2002-01-06 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-06 13:01 Gertjan van Wingerde [this message]
2002-01-06 13:10 ` drivers/md compile fixes Gertjan van Wingerde

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=3C384A97.8090909@home.nl \
    --to=gwingerde@home.nl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.