Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b01fcbb authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz
Browse files

ide-cd: fold cdrom_start_seek into ide_cd_do_request



Do what the compiler does anyway: inline a function that is used only once.

This saves us the overhead of a function call and the function is small enough
to be embedded in the callsite anyways.

Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent b6ca440a
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -753,14 +753,6 @@ static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive)
	return cdrom_transfer_packet_command(drive, rq, &cdrom_seek_intr);
}

static void cdrom_start_seek(ide_drive_t *drive)
{
	struct cdrom_info *info = drive->driver_data;

	info->dma = 0;
	info->start_seek = jiffies;
}

/*
 * Fix up a possibly partially-processed request so that we can start it over
 * entirely, or even put it back on the request queue.
@@ -1219,7 +1211,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
		    drive->dsc_overlap) {
			xferlen = 0;
			fn = cdrom_start_seek_continuation;
			cdrom_start_seek(drive);
			info->dma = 0;
			info->start_seek = jiffies;
		} else {
			xferlen = 32768;
			fn = cdrom_start_rw_cont;