From: mikem@beardog.cca.cpqcorp.net
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org, mike.miller@hp.com, steve.cameron@hp.com
Subject: RE:cciss patches for 2.4.21-rc1, 3 of 4
Date: Thu, 24 Apr 2003 17:12:08 -0500 [thread overview]
Message-ID: <200304242212.h3OMC8n01140@beardog.cca.cpqcorp.net> (raw)
2003/04/24
Changes:
1: Replaces the bit shifting in cciss_get_geometry() &
register_new_disk() with be32_to_cpu() to ensure correct
endian-ness across platforms.
diff -urN lx2421p7-1/drivers/block/cciss.c lx2421p7-1.1/drivers/block/cciss.c
--- lx2421p7-1/drivers/block/cciss.c Mon Apr 7 13:11:04 2003
+++ lx2421p7-1.1/drivers/block/cciss.c Mon Apr 7 13:12:28 2003
@@ -1348,15 +1348,7 @@
sizeof(ReportLunData_struct), 0, 0, 0 );
if (return_code == IO_OK) {
- /* printk("LUN Data\n--------------------------\n"); */
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[0])) << 24;
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[1])) << 16;
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[2])) << 8;
- listlength |= 0xff &
- (unsigned int)(ld_buff->LUNListLength[3]);
+ listlength = be32_to_cpu(*((__u32 *) &ld_buff->LUNListLength[0]));
} else {
/* reading number of logical volumes failed */
printk(KERN_WARNING "cciss: report logical volume"
@@ -2699,10 +2691,7 @@
printk("LUN Data\n--------------------------\n");
#endif /* CCISS_DEBUG */
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24;
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16;
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8;
- listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]);
+ listlength = be32_to_cpu(*((__u32 *) &ld_buff->LUNListLength[0]));
} else { /* reading number of logical volumes failed */
printk(KERN_WARNING "cciss: report logical volume"
" command failed\n");
reply other threads:[~2003-04-24 22:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200304242212.h3OMC8n01140@beardog.cca.cpqcorp.net \
--to=mikem@beardog.cca.cpqcorp.net \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.com \
--cc=steve.cameron@hp.com \
/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).