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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux