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

Doug Ledford
2017-09-27T15:38:11Z

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.

--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD