From 5c66fd8592a235d1a57bf65b2bae748dde12d36f Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Wed, 29 Mar 2017 13:36:11 -0700 Subject: [PATCH] net/qede/base: add comment Add a comment for the endianness manipulation in ecore_mcp_send_drv_version(). Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_mcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c index 245d478098..df6ebd2a81 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -1662,6 +1662,7 @@ ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, p_drv_version->version = p_ver->version; num_words = (MCP_DRV_VER_STR_SIZE - 4) / 4; for (i = 0; i < num_words; i++) { + /* The driver name is expected to be in a big-endian format */ p_name = &p_ver->name[i * sizeof(u32)]; val = OSAL_CPU_TO_BE32(*(u32 *)p_name); *(u32 *)&p_drv_version->name[i * sizeof(u32)] = val; -- 2.20.1