Re: [PATCH] ide: ide-cd.c blocklen is a big-endian value
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: 2008-07-24 18:48:19
Also in:
linux-next
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: 2008-07-24 18:48:19
Also in:
linux-next
On Thursday 24 July 2008, Harvey Harrison wrote:
Noticed by sparse between next-20080722 and next-20080723 Signed-off-by: Harvey Harrison <redacted>
Thanks for noticing/fixing this.
I integrated it into the guilty patch
("ide-cd: fix oops when using growisofs").
--- drivers/ide/ide-cd.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 3a6fef5..a384500 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c@@ -1318,17 +1318,17 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, * Sanity check the given block size */ switch (capbuf.blocklen) { - case 512: - case 1024: - case 2048: - case 4096: + case __constant_cpu_to_be32(512): + case __constant_cpu_to_be32(1024): + case __constant_cpu_to_be32(2048): + case __constant_cpu_to_be32(4096): break; default: printk(KERN_ERR "%s: weird block size %u\n", drive->name, capbuf.blocklen); printk(KERN_ERR "%s: default to 2kb block size\n", drive->name); - capbuf.blocklen = 2048; + capbuf.blocklen = __constant_cpu_to_be32(2048); break; }-- 1.5.6.4.570.g052e