[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F5785A9.2040707@bfs.de>
Date: Wed, 07 Mar 2012 16:58:33 +0100
From: walter harms <wharms@....de>
To: Mark Salyzyn <mark_salyzyn@...atex.com>
CC: santoshprasadnayak@...il.com, lindar_liu <lindar_liu@...sh.com>,
James Bottomley <JBottomley@...allels.com>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Jack Wang <jack_wang@...sh.com>
Subject: Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.
Am 07.03.2012 16:11, schrieb Mark Salyzyn:
> One more NAK:
>
>> @@ -3497,7 +3499,7 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb)
>> static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
>> {
>> u32 pHeader = (u32)*(u32 *)piomb;
>> - u8 opc = (u8)((le32_to_cpu(pHeader)) & 0xFFF);
>> + u8 opc = (u8)(pHeader & 0xFFF);
>>
>> PM8001_MSG_DBG(pm8001_ha, pm8001_printk("process_one_iomb:"));
>
> The swap is necessary. Should be:
>
> __le32 pHeader = (__le32)*(__le32 *)piomb;
>
> instead ...
>
hi,
would it help to make piomb __le32 instead of void ?
Also i do not understand what want to gain from 0xFFF
Doing (u8) is effectively doing & 0xFF.
re,
wh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists