Skip to content

Commit

Permalink
ide-cd: unify moving to the next buffer in cdrom_rw_intr()
Browse files Browse the repository at this point in the history
Use the fact that for the first loop rq->current_nr_sectors is always
set and unify moving to the next buffer for read/write requests.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 21ea1f0 commit 37782fc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,13 +1302,6 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive)
while (sectors_to_transfer > 0) {
int this_transfer;

/*
* If we've filled the present buffer but there's another
* chained buffer after it, move on.
*/
if (!write && rq->current_nr_sectors == 0 && rq->nr_sectors)
cdrom_end_request(drive, 1);

if (!rq->current_nr_sectors) {
if (!write)
/*
Expand Down Expand Up @@ -1342,7 +1335,7 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive)
/*
* current buffer complete, move on
*/
if (write && rq->current_nr_sectors == 0 && rq->nr_sectors)
if (rq->current_nr_sectors == 0 && rq->nr_sectors)
cdrom_end_request(drive, 1);
}

Expand Down

0 comments on commit 37782fc

Please sign in to comment.