From: walter harms <wharms@bfs.de>
To: Mark Salyzyn <mark_salyzyn@xyratex.com>
Cc: santoshprasadnayak@gmail.com, lindar_liu <lindar_liu@usish.com>,
James Bottomley <JBottomley@parallels.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Jack Wang <jack_wang@usish.com>
Subject: Re: [PATCH] [SCSI] pm8001: fix endian issue with code optimization.
Date: Wed, 07 Mar 2012 15:58:33 +0000 [thread overview]
Message-ID: <4F5785A9.2040707@bfs.de> (raw)
In-Reply-To: <00F74E64-A5EC-4DF8-A347-2D8BC5659638@xyratex.com>
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
next prev parent reply other threads:[~2012-03-07 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 14:56 [PATCH] [SCSI] pm8001: fix endian issue with code optimization santoshprasadnayak
2012-02-27 4:51 ` Jack Wang
2012-03-07 14:58 ` Mark Salyzyn
2012-03-07 15:11 ` Mark Salyzyn
2012-03-07 15:34 ` santosh prasad nayak
2012-03-07 15:58 ` walter harms [this message]
2012-03-07 16:10 ` Mark Salyzyn
2012-03-07 17:36 ` santosh prasad nayak
2012-03-07 17:25 ` Mark Salyzyn
2012-03-07 17:37 ` Dan Carpenter
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=4F5785A9.2040707@bfs.de \
--to=wharms@bfs.de \
--cc=JBottomley@parallels.com \
--cc=jack_wang@usish.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lindar_liu@usish.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@xyratex.com \
--cc=santoshprasadnayak@gmail.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).