* [PATCH] ide: ide-cd.c blocklen is a big-endian value
@ 2008-07-23 22:31 Harvey Harrison
2008-07-24 18:48 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Harvey Harrison @ 2008-07-23 22:31 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-next, linux-ide
Noticed by sparse between next-20080722 and next-20080723
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ide: ide-cd.c blocklen is a big-endian value
2008-07-23 22:31 [PATCH] ide: ide-cd.c blocklen is a big-endian value Harvey Harrison
@ 2008-07-24 18:48 ` Bartlomiej Zolnierkiewicz
2008-07-24 19:16 ` Harvey Harrison
0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-24 18:48 UTC (permalink / raw)
To: Harvey Harrison
Cc: linux-next, linux-ide, Jens Axboe, Andrew Morton, Michael Buesch,
Jan Kara, Arnd Bergmann, Borislav Petkov
On Thursday 24 July 2008, Harvey Harrison wrote:
> Noticed by sparse between next-20080722 and next-20080723
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ide: ide-cd.c blocklen is a big-endian value
2008-07-24 18:48 ` Bartlomiej Zolnierkiewicz
@ 2008-07-24 19:16 ` Harvey Harrison
2008-07-24 23:52 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Harvey Harrison @ 2008-07-24 19:16 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: linux-next, linux-ide, Jens Axboe, Andrew Morton, Michael Buesch,
Jan Kara, Arnd Bergmann, Borislav Petkov
On Thu, 2008-07-24 at 20:48 +0200, Bartlomiej Zolnierkiewicz wrote:
> On Thursday 24 July 2008, Harvey Harrison wrote:
> > Noticed by sparse between next-20080722 and next-20080723
> >
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
>
> Thanks for noticing/fixing this.
>
> I integrated it into the guilty patch
> ("ide-cd: fix oops when using growisofs").
>
This is precisely why I'm running sparse on each linux-next, so
no worries.
Harvey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ide: ide-cd.c blocklen is a big-endian value
2008-07-24 19:16 ` Harvey Harrison
@ 2008-07-24 23:52 ` Stephen Rothwell
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2008-07-24 23:52 UTC (permalink / raw)
To: Harvey Harrison
Cc: Bartlomiej Zolnierkiewicz, linux-next, linux-ide, Jens Axboe,
Andrew Morton, Michael Buesch, Jan Kara, Arnd Bergmann,
Borislav Petkov
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Hi Harvey,
On Thu, 24 Jul 2008 12:16:57 -0700 Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> This is precisely why I'm running sparse on each linux-next, so
> no worries.
Thanks Harvey, that is a great addition to the testing.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-24 23:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23 22:31 [PATCH] ide: ide-cd.c blocklen is a big-endian value Harvey Harrison
2008-07-24 18:48 ` Bartlomiej Zolnierkiewicz
2008-07-24 19:16 ` Harvey Harrison
2008-07-24 23:52 ` Stephen Rothwell
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).