Thread (10 messages) 10 messages, 5 authors, 2012-03-07

Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.

From: Dan Carpenter <hidden>
Date: 2012-03-07 17:35:46
Also in: linux-scsi, lkml

On Wed, Mar 07, 2012 at 10:54:17PM +0530, santosh prasad nayak wrote:
 static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
 {
-       u32 pHeader = (u32)*(u32 *)piomb;
-       u8 opc = (u8)(pHeader & 0xFFF);
+       __le32 pHeader = (__le32)*(__le32 *)piomb;
                           ^^^^^^^^
You could drop this cast, "*(__le32 *)piomb" is already an __le32
data type.

regards,
dan carpenter

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help