From d34c87e4ba3d1857f80a65179e81a18705a31656 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 29 Apr 2008 14:37:52 +0200 Subject: block: replace sizeof(rq->cmd) with BLK_MAX_CDB This is a preparation for changing rq->cmd from the static array to a pointer. Signed-off-by: FUJITA Tomonori Cc: Boaz Harrosh Cc: Bartlomiej Zolnierkiewicz Cc: Jens Axboe Signed-off-by: Jens Axboe --- drivers/ide/ide-cd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/ide/ide-cd.c') diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index fe9df38f62cc..68e7f19dc036 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -782,7 +782,7 @@ static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive) sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS); - memset(rq->cmd, 0, sizeof(rq->cmd)); + memset(rq->cmd, 0, BLK_MAX_CDB); rq->cmd[0] = GPCMD_SEEK; put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]); @@ -1694,7 +1694,7 @@ static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq) long block = (long)rq->hard_sector / (hard_sect >> 9); unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9); - memset(rq->cmd, 0, sizeof(rq->cmd)); + memset(rq->cmd, 0, BLK_MAX_CDB); if (rq_data_dir(rq) == READ) rq->cmd[0] = GPCMD_READ_10; -- cgit v1.2.3