diff options
-rw-r--r-- | block/blk-core.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-cd_verbose.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index fe0d1390b743..e6fdb288be65 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -173,7 +173,7 @@ void blk_dump_rq_flags(struct request *rq, char *msg) | |||
173 | 173 | ||
174 | if (blk_pc_request(rq)) { | 174 | if (blk_pc_request(rq)) { |
175 | printk(KERN_INFO " cdb: "); | 175 | printk(KERN_INFO " cdb: "); |
176 | for (bit = 0; bit < sizeof(rq->cmd); bit++) | 176 | for (bit = 0; bit < BLK_MAX_CDB; bit++) |
177 | printk("%02x ", rq->cmd[bit]); | 177 | printk("%02x ", rq->cmd[bit]); |
178 | printk("\n"); | 178 | printk("\n"); |
179 | } | 179 | } |
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) | |||
782 | 782 | ||
783 | sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS); | 783 | sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS); |
784 | 784 | ||
785 | memset(rq->cmd, 0, sizeof(rq->cmd)); | 785 | memset(rq->cmd, 0, BLK_MAX_CDB); |
786 | rq->cmd[0] = GPCMD_SEEK; | 786 | rq->cmd[0] = GPCMD_SEEK; |
787 | put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]); | 787 | put_unaligned(cpu_to_be32(frame), (unsigned int *) &rq->cmd[2]); |
788 | 788 | ||
@@ -1694,7 +1694,7 @@ static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq) | |||
1694 | long block = (long)rq->hard_sector / (hard_sect >> 9); | 1694 | long block = (long)rq->hard_sector / (hard_sect >> 9); |
1695 | unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9); | 1695 | unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9); |
1696 | 1696 | ||
1697 | memset(rq->cmd, 0, sizeof(rq->cmd)); | 1697 | memset(rq->cmd, 0, BLK_MAX_CDB); |
1698 | 1698 | ||
1699 | if (rq_data_dir(rq) == READ) | 1699 | if (rq_data_dir(rq) == READ) |
1700 | rq->cmd[0] = GPCMD_READ_10; | 1700 | rq->cmd[0] = GPCMD_READ_10; |
diff --git a/drivers/ide/ide-cd_verbose.c b/drivers/ide/ide-cd_verbose.c index 6ed7ca071331..6490a2dea96b 100644 --- a/drivers/ide/ide-cd_verbose.c +++ b/drivers/ide/ide-cd_verbose.c | |||
@@ -326,7 +326,7 @@ void ide_cd_log_error(const char *name, struct request *failed_command, | |||
326 | 326 | ||
327 | printk(KERN_ERR " The failed \"%s\" packet command " | 327 | printk(KERN_ERR " The failed \"%s\" packet command " |
328 | "was: \n \"", s); | 328 | "was: \n \"", s); |
329 | for (i = 0; i < sizeof(failed_command->cmd); i++) | 329 | for (i = 0; i < BLK_MAX_CDB; i++) |
330 | printk(KERN_CONT "%02x ", failed_command->cmd[i]); | 330 | printk(KERN_CONT "%02x ", failed_command->cmd[i]); |
331 | printk(KERN_CONT "\"\n"); | 331 | printk(KERN_CONT "\"\n"); |
332 | } | 332 | } |