Commit caeff901 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] death of ->rq_dev

	RIP.  It's not used anymore, so we kill assignments to it and the
field itself.  That was the last serious use of kdev_t in block drivers.
parent e2e442eb
......@@ -1799,7 +1799,6 @@ static int __make_request(request_queue_t *q, struct bio *bio)
req->buffer = bio_data(bio); /* see ->buffer comment above */
req->waiting = NULL;
req->bio = req->biotail = bio;
req->rq_dev = to_kdev_t(bio->bi_bdev->bd_dev);
req->rq_disk = bio->bi_bdev->bd_disk;
req->start_time = jiffies;
add_request(q, req, insert_here);
......
......@@ -51,7 +51,6 @@ int blk_do_rq(request_queue_t *q, struct block_device *bdev, struct request *rq)
DECLARE_COMPLETION(wait);
int err = 0;
rq->rq_dev = to_kdev_t(bdev->bd_dev);
rq->rq_disk = bdev->bd_disk;
/*
......
......@@ -1356,7 +1356,6 @@ int ide_diag_taskfile (ide_drive_t *drive, ide_task_t *args, unsigned long data_
rq->special = args;
rq->errors = 0;
rq->rq_status = RQ_ACTIVE;
rq->rq_dev = mk_kdev(disk->major, disk->first_minor);
rq->rq_disk = drive->disk;
rq->waiting = &wait;
......
......@@ -1530,7 +1530,6 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
rq->errors = 0;
rq->rq_status = RQ_ACTIVE;
rq->rq_dev = mk_kdev(drive->disk->major, drive->disk->first_minor);
rq->rq_disk = drive->disk;
/*
......
......@@ -335,8 +335,6 @@ static Scsi_Request * osst_do_scsi(Scsi_Request *SRpnt, OS_Scsi_Tape *STp,
SRpnt->sr_request->waiting = &(STp->wait);
SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
SRpnt->sr_request->rq_disk = STp->disk;
SRpnt->sr_request->rq_dev = mk_kdev(STp->disk->major,
STp->disk->first_minor);
scsi_do_req(SRpnt, (void *)cmd, bp, bytes, osst_sleep_done, timeout, retries);
......@@ -5486,8 +5484,6 @@ static int osst_attach(Scsi_Device * SDp)
tpnt->device = SDp;
disk->private_data = &tpnt->driver;
sprintf(disk->disk_name, "osst%d", i);
disk->major = MAJOR_NR;
disk->first_minor = i;
tpnt->driver = &osst_template;
tpnt->disk = disk;
tpnt->dirty = 0;
......
......@@ -703,8 +703,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
srp->my_cmdp = SRpnt;
q = &SRpnt->sr_device->request_queue;
SRpnt->sr_request->rq_disk = sdp->disk;
SRpnt->sr_request->rq_dev = mk_kdev(sdp->disk->major,
sdp->disk->first_minor);
SRpnt->sr_sense_buffer[0] = 0;
SRpnt->sr_cmd_len = hp->cmd_len;
SRpnt->sr_use_sg = srp->data.k_use_sg;
......@@ -1260,7 +1258,6 @@ sg_cmd_done(Scsi_Cmnd * SCpnt)
SRpnt->sr_buffer = NULL;
SRpnt->sr_underflow = 0;
SRpnt->sr_request->rq_disk = NULL; /* "sg" _disowns_ request blk */
SRpnt->sr_request->rq_dev = mk_kdev(0, 0);
srp->my_cmdp = NULL;
srp->done = 1;
......
......@@ -392,8 +392,6 @@ static Scsi_Request *
SRpnt->sr_cmd_len = 0;
SRpnt->sr_request->waiting = &(STp->wait);
SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
SRpnt->sr_request->rq_dev = mk_kdev(STp->disk->major,
STp->disk->first_minor);
SRpnt->sr_request->rq_disk = STp->disk;
scsi_do_req(SRpnt, (void *) cmd, bp, bytes,
......@@ -3740,8 +3738,6 @@ static int st_attach(Scsi_Device * SDp)
}
memset(tpnt, 0, sizeof(Scsi_Tape));
tpnt->disk = disk;
disk->major = SCSI_TAPE_MAJOR; /* yeah, yeah */
disk->first_minor = i;
sprintf(disk->disk_name, "st%d", i);
disk->private_data = &tpnt->driver;
tpnt->driver = &st_template;
......
......@@ -47,7 +47,6 @@ struct request {
* blkdev_dequeue_request! */
unsigned long flags; /* see REQ_ bits below */
kdev_t rq_dev;
sector_t sector;
unsigned long nr_sectors;
unsigned int current_nr_sectors;
......
......@@ -36,7 +36,7 @@ typedef struct { unsigned short major, minor; } kdev_t;
Admissible operations on an object of type kdev_t:
- passing it along
- comparing it for equality with another such object
- storing it in inode->i_rdev, req->rq_dev, de->dc_dev, tty->device
- storing it in inode->i_rdev or tty->device
- using its bit pattern as argument in a hash function
- finding its major and minor
- complaining about it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment