linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 57/63] ide-cd: unify moving to the next buffer in cdrom_rw_intr()
Date: Thu, 20 Dec 2007 02:35:59 +0100	[thread overview]
Message-ID: <200712200235.59108.bzolnier@gmail.com> (raw)


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>
---
-46 bytes
 drivers/ide/ide-cd.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Index: b/drivers/ide/ide-cd.c
===================================================================
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1287,13 +1287,6 @@ static ide_startstop_t cdrom_rw_intr(ide
 	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)
 				/*
@@ -1327,7 +1320,7 @@ static ide_startstop_t cdrom_rw_intr(ide
 		/*
 		 * 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);
 	}
 

                 reply	other threads:[~2007-12-20  1:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200712200235.59108.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).