linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-next <linux-next@vger.kernel.org>,
	linux-ide <linux-ide@vger.kernel.org>
Subject: [PATCH] ide: ide-cd.c blocklen is a big-endian value
Date: Wed, 23 Jul 2008 15:31:36 -0700	[thread overview]
Message-ID: <1216852296.30386.21.camel@brick> (raw)

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

             reply	other threads:[~2008-07-23 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 22:31 Harvey Harrison [this message]
2008-07-24 18:48 ` [PATCH] ide: ide-cd.c blocklen is a big-endian value Bartlomiej Zolnierkiewicz
2008-07-24 19:16   ` Harvey Harrison
2008-07-24 23:52     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1216852296.30386.21.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).