lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200810031929.24291.bzolnier@gmail.com>
Date:	Fri, 3 Oct 2008 19:29:23 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Borislav Petkov <petkovbb@...glemail.com>
Cc:	linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org,
	Borislav Petkov <petkovbb@...il.com>
Subject: Re: [PATCH 3/3] ide-cd: shorten ide_cd_request_sense_fixup's param list

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@...il.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;
>  		}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ