linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH 3/3] ide-cd: shorten ide_cd_request_sense_fixup's param list
Date: Fri, 3 Oct 2008 19:29:23 +0200	[thread overview]
Message-ID: <200810031929.24291.bzolnier@gmail.com> (raw)
In-Reply-To: <1222669799-6565-4-git-send-email-petkovbb@gmail.com>

On Monday 29 September 2008, Borislav Petkov wrote:
> ... since HWGROUP(drive)->rq points to the same rq as in the irq handler. While

Since we already have obtained rq pointer why not pass it to the helper
function instead of having the helper function waste cycles on it?

Moreover it results in slightly bigger code...

> at it, remove stale comment.

I applied this part only.

> There should be no functionality change resulting from this patch.
> 
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
>  drivers/ide/ide-cd.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> index e41b94d..bf92cd6 100644
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@ -843,12 +843,11 @@ static void ide_cd_restore_request(ide_drive_t *drive, struct request *rq)
>  	rq->q->prep_rq_fn(rq->q, rq);
>  }
>  
> -/*
> - * All other packet commands.
> - */
> -static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq)
> +static void ide_cd_request_sense_fixup(ide_drive_t *drive)
>  {
>  
> +	struct request *rq = HWGROUP(drive)->rq;
> +
>  	ide_debug_log(IDE_DBG_FUNC, "Call %s, rq->cmd[0]: 0x%x\n",
>  		      __func__, rq->cmd[0]);
>  
> @@ -1021,7 +1020,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
>  			cdrom_end_request(drive, uptodate);
>  			return ide_stopped;
>  		} else if (!blk_pc_request(rq)) {
> -			ide_cd_request_sense_fixup(drive, rq);
> +			ide_cd_request_sense_fixup(drive);
>  			/* complain if we still have data left to transfer */
>  			uptodate = rq->data_len ? 0 : 1;
>  		}

      reply	other threads:[~2008-10-03 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29  6:29 [PATCH 0/3] ide-cd: debug log enhancements Borislav Petkov
2008-09-29  6:29 ` [PATCH 1/3] " Borislav Petkov
2008-10-03 17:15   ` Bartlomiej Zolnierkiewicz
2008-09-29  6:29 ` [PATCH 2/3] ide-cd: small drive type print fix Borislav Petkov
2008-10-03 17:18   ` Bartlomiej Zolnierkiewicz
2008-10-04  8:28     ` Borislav Petkov
2008-10-05 15:54       ` Bartlomiej Zolnierkiewicz
2008-09-29  6:29 ` [PATCH 3/3] ide-cd: shorten ide_cd_request_sense_fixup's param list Borislav Petkov
2008-10-03 17:29   ` Bartlomiej Zolnierkiewicz [this message]

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=200810031929.24291.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    --cc=petkovbb@googlemail.com \
    /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).