lkml.org 
[lkml]   [2020]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 062/203] RDMA/hns: remove a redundant le16_to_cpu
    Date
    From: Weihang Li <liweihang@hisilicon.com>

    commit 9f7d7064009c37cb26eee4a83302cf077fe180d6 upstream.

    Type of ah->av.vlan is u16, there will be a problem using le16_to_cpu
    on it.

    Fixes: 82e620d9c3a0 ("RDMA/hns: Modify the data structure of hns_roce_av")
    Signed-off-by: Weihang Li <liweihang@hisilicon.com>
    Link: https://lore.kernel.org/r/1567566885-23088-2-git-send-email-liweihang@hisilicon.com
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
    +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
    @@ -389,7 +389,7 @@ static int hns_roce_v2_post_send(struct
    roce_set_field(ud_sq_wqe->byte_36,
    V2_UD_SEND_WQE_BYTE_36_VLAN_M,
    V2_UD_SEND_WQE_BYTE_36_VLAN_S,
    - le16_to_cpu(ah->av.vlan));
    + ah->av.vlan);
    roce_set_field(ud_sq_wqe->byte_36,
    V2_UD_SEND_WQE_BYTE_36_HOPLIMIT_M,
    V2_UD_SEND_WQE_BYTE_36_HOPLIMIT_S,

    \
     
     \ /
      Last update: 2020-01-17 00:47    [W:4.021 / U:0.896 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site