From: Michael Margolin <mrgolin@amazon.com>
To: <jgg@nvidia.com>, <leon@kernel.org>, <linux-rdma@vger.kernel.org>
Cc: <sleybo@amazon.com>, <matua@amazon.com>, <gal.pressman@linux.dev>,
"kernel test robot" <lkp@intel.com>,
Yehuda Yitschak <yehuday@amazon.com>,
"Yonatan Nachum" <ynachum@amazon.com>
Subject: [PATCH] RDMA/efa: Fix node guid compiler warning
Date: Tue, 24 Sep 2024 12:16:03 +0000 [thread overview]
Message-ID: <20240924121603.16006-1-mrgolin@amazon.com> (raw)
The GUID is received in big-endian so align types accordingly to avoid
compiler warnings.
Closes: https://lore.kernel.org/oe-kbuild-all/202409032113.bvyVfsNp-lkp@intel.com/
Fixes: 04e36fd27a2a ("RDMA/efa: Add support for node guid")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
Reviewed-by: Yonatan Nachum <ynachum@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
---
drivers/infiniband/hw/efa/efa_com_cmd.c | 2 +-
drivers/infiniband/hw/efa/efa_com_cmd.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.c b/drivers/infiniband/hw/efa/efa_com_cmd.c
index 5a774925cdea..5754da4e6ff8 100644
--- a/drivers/infiniband/hw/efa/efa_com_cmd.c
+++ b/drivers/infiniband/hw/efa/efa_com_cmd.c
@@ -465,7 +465,7 @@ int efa_com_get_device_attr(struct efa_com_dev *edev,
result->db_bar = resp.u.device_attr.db_bar;
result->max_rdma_size = resp.u.device_attr.max_rdma_size;
result->device_caps = resp.u.device_attr.device_caps;
- result->guid = resp.u.device_attr.guid;
+ result->guid = (__force __be64)resp.u.device_attr.guid;
if (result->admin_api_version < 1) {
ibdev_err_ratelimited(
diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.h b/drivers/infiniband/hw/efa/efa_com_cmd.h
index 668d033f7477..56382cd1b7c4 100644
--- a/drivers/infiniband/hw/efa/efa_com_cmd.h
+++ b/drivers/infiniband/hw/efa/efa_com_cmd.h
@@ -112,7 +112,7 @@ struct efa_com_get_device_attr_result {
u8 addr[EFA_GID_SIZE];
u64 page_size_cap;
u64 max_mr_pages;
- u64 guid;
+ __be64 guid;
u32 mtu;
u32 fw_version;
u32 admin_api_version;
--
2.40.1
next reply other threads:[~2024-09-24 12:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 12:16 Michael Margolin [this message]
2024-09-24 18:00 ` [PATCH] RDMA/efa: Fix node guid compiler warning Jason Gunthorpe
2024-09-26 12:56 ` Margolin, Michael
2024-09-26 13:25 ` Margolin, Michael
2024-09-26 14:54 ` Jason Gunthorpe
2024-09-26 20:03 ` Margolin, Michael
2024-09-26 22:34 ` Jason Gunthorpe
2024-10-02 12:30 ` Margolin, Michael
2024-10-02 13:04 ` Jason Gunthorpe
2024-10-06 13:19 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240924121603.16006-1-mrgolin@amazon.com \
--to=mrgolin@amazon.com \
--cc=gal.pressman@linux.dev \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.com \
--cc=matua@amazon.com \
--cc=sleybo@amazon.com \
--cc=yehuday@amazon.com \
--cc=ynachum@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox