linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).