ide-cd: fold cdrom_start_seek into ide_cd_do_request

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, July 16, 2008 - 4:14 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b01fc...
Commit:     4b01fcbbe69bba34a8494fca6376ac0804f0f51d
Parent:     b6ca440a8ff15e12478ea6f026a52970e7a0c54c
Author:     Borislav Petkov <petkovbb@googlemail.com>
AuthorDate: Wed Jul 16 20:33:46 2008 +0200
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Wed Jul 16 20:33:46 2008 +0200

    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: Borislav Petkov <petkovbb@gmail.com>
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-cd.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index b61ce5e..66d82c1 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide-cd: fold cdrom_start_seek into ide_cd_do_request, Linux Kernel Mailing ..., (Wed Jul 16, 4:14 pm)