Re: [PATCH for-next 02/12] IB/hfi1: Convert the macro AHG_HEADER_SET into an inline function

Dennis Dalessandro
2017-09-29T14:01:33Z

On 9/27/2017 11:38 AM, Doug Ledford wrote:
> On Wed, 2017-09-27 at 18:21 +0300, Leon Romanovsky wrote:
>> On Tue, Sep 26, 2017 at 07:00:11AM -0700, Dennis Dalessandro wrote:
>>>
>>> - AHG_HEADER_SET(ahg, diff, 0, 0, 12,
>>> - cpu_to_le16(LRH2PBC(lrhlen)));
>>> + idx = ahg_header_set(ahg, idx, array_size, 0, 0,
>>> 12,
>>> + (__force
>>> u16)cpu_to_le16(LRH2PBC(lrhlen)));
>>
>> This "__force" looks suspicious to me and I think you have an error
>> here by
>> using cpu_to_le16 instead of cpu_to_be16.
>
> I took this patch as is because it simply translates from the old to
> the new method of doing things. If there is a bug here in the use of
> le16 instead if be16, then it existed before too and should be fixed in
> a separate, incremental fix patch.
>

We will take a look and send a follow up patch.

-Denny