From linux-kernel-owner+willy=40w.ods.org@vger.kernel.org Fri Apr 25 00:15:23 2003 Return-Path: Received: from vax.home.local (vax [10.2.1.2]) by alpha.home.local (8.12.4/8.12.1) with ESMTP id h3OMFMJ7021932 for ; Fri, 25 Apr 2003 00:15:23 +0200 Received: from vger.kernel.org (vger.kernel.org [209.116.70.75]) by vax.home.local (8.12.2/8.12.1) with ESMTP id h3OMFA1R021600 for ; Fri, 25 Apr 2003 00:15:21 +0200 (CEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264460AbTDXWAY (ORCPT ); Thu, 24 Apr 2003 18:00:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264463AbTDXWAY (ORCPT ); Thu, 24 Apr 2003 18:00:24 -0400 Received: from zcamail03.zca.compaq.com ([161.114.32.103]:17672 "EHLO zcamail03.zca.compaq.com") by vger.kernel.org with ESMTP id S264460AbTDXWAU (ORCPT ); Thu, 24 Apr 2003 18:00:20 -0400 Received: from taynzmail03.nz-tay.cpqcorp.net (taynzmail03.nz-tay.cpqcorp.net [16.47.4.103]) by zcamail03.zca.compaq.com (Postfix) with ESMTP id 1DDFD7899; Thu, 24 Apr 2003 15:12:25 -0700 (PDT) Received: from beardog.cca.cpqcorp.net (beardog.cca.cpqcorp.net [16.101.176.144]) by taynzmail03.nz-tay.cpqcorp.net (Postfix) with ESMTP id 54FBF1252; Thu, 24 Apr 2003 18:12:24 -0400 (EDT) Received: (from mikem@localhost) by beardog.cca.cpqcorp.net (8.11.6/8.11.6) id h3OMC8n01140; Thu, 24 Apr 2003 17:12:08 -0500 Date: Thu, 24 Apr 2003 17:12:08 -0500 From: mikem@beardog.cca.cpqcorp.net Message-Id: <200304242212.h3OMC8n01140@beardog.cca.cpqcorp.net> To: axboe@suse.de Subject: RE:cciss patches for 2.4.21-rc1, 3 of 4 Cc: linux-kernel@vger.kernel.org, mike.miller@hp.com, steve.cameron@hp.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1878 Lines: 44 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"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/