Re: [PATCH] RDMA/efa: Fix node guid compiler warning

Leon Romanovsky
2024-10-06T13:19:49Z

On Tue, Sep 24, 2024 at 12:16:03PM +0000, Michael Margolin wrote:
> 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;

Based on the discussion, I'm dropping this patch.

Thanks