From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 213E3C072B1 for ; Thu, 30 May 2019 04:46:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D793425B52 for ; Thu, 30 May 2019 04:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559191574; bh=jRWxpbZmGzdZ4v+fOPI/7x2p+SW4aRK9HIIBcEKr9XI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vZibXvpCIB0X9hWjugeYT3XSHghpAa/bGlOArXgzDoYAxmhDfrLtW3ddwkjZBHGEU 5sFk8wDRVP9TJ1+Odh5VWpub7SoDFbZevUD9QE9eUwu8Wdj327IymIKHJ4vLLyAqdH kdcvr+xBSfQk3jg40gtmlmrEURtAWo2aK04Aqy/c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733042AbfE3EqN (ORCPT ); Thu, 30 May 2019 00:46:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:52106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728656AbfE3DLo (ORCPT ); Wed, 29 May 2019 23:11:44 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E95AD24502; Thu, 30 May 2019 03:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559185902; bh=jRWxpbZmGzdZ4v+fOPI/7x2p+SW4aRK9HIIBcEKr9XI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w5t71Ze2GfzfEi1yQufgTL+T8hzDFUxOhtYOx61jvUn4UtluDRyGxpvLUHPV1eTz6 bXbJ+sb+sb2vxZV7IWxHl67uCPsG1ot+4Fw1G5CIF7/7LAD8IPa0ucSGQco/SdBKWd GUTA01aubX6/Q3RpRJYyxc3V7IlCMc6f0yh8kIwk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , Gal Pressman , Lijun Ou , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.1 271/405] RDMA/hns: Fix bad endianess of port_pd variable Date: Wed, 29 May 2019 20:04:29 -0700 Message-Id: <20190530030554.613116341@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030540.291644921@linuxfoundation.org> References: <20190530030540.291644921@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6734b2973565e36659e97e12ab0d0faf1d9f3fbe ] port_pd is treated as le32 in declaration and read, fix assignment to be in le32 too. This change fixes the following compilation warnings. drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: warning: incorrect type in assignment (different base types) drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: expected restricted __le32 [usertype] port_pd drivers/infiniband/hw/hns/hns_roce_ah.c:67:24: got restricted __be32 [usertype] Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Leon Romanovsky Reviewed-by: Gal Pressman Reviewed-by: Lijun Ou Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hns/hns_roce_ah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_ah.c b/drivers/infiniband/hw/hns/hns_roce_ah.c index b3c8c45ec1e3e..64e0c69b69c53 100644 --- a/drivers/infiniband/hw/hns/hns_roce_ah.c +++ b/drivers/infiniband/hw/hns/hns_roce_ah.c @@ -70,7 +70,7 @@ struct ib_ah *hns_roce_create_ah(struct ib_pd *ibpd, HNS_ROCE_VLAN_SL_BIT_MASK) << HNS_ROCE_VLAN_SL_SHIFT; - ah->av.port_pd = cpu_to_be32(to_hr_pd(ibpd)->pdn | + ah->av.port_pd = cpu_to_le32(to_hr_pd(ibpd)->pdn | (rdma_ah_get_port_num(ah_attr) << HNS_ROCE_PORT_NUM_SHIFT)); ah->av.gid_index = grh->sgid_index; -- 2.20.1