From 22b25f8b97aa57b6fa564df1b512ae3d1f750508 Mon Sep 17 00:00:00 2001 From: nannaiah Date: Thu, 18 Feb 2021 08:18:19 -0800 Subject: [PATCH] Add fix to misra & cert errors for ethernet server Bug 2694285 Change-Id: I6b899538ed92f67351cc21ccbb900d842e91ad5d Signed-off-by: Nagaraj annaiah Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2486524 Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit Reviewed-by: Rakesh Goyal Reviewed-by: Srinivas Ramachandran Reviewed-by: mobile promotions --- include/ivc_core.h | 8 ++++---- osi/core/eqos_core.h | 4 ++-- osi/core/eqos_mmc.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/ivc_core.h b/include/ivc_core.h index 0dcef0f..3f73133 100644 --- a/include/ivc_core.h +++ b/include/ivc_core.h @@ -37,7 +37,7 @@ /** * @brief IVC commands between OSD & OSI. */ -enum ivc_cmd { +typedef enum ivc_cmd { poll_for_swr = 1, core_init, core_deinit, @@ -85,7 +85,7 @@ enum ivc_cmd { set_mdc_clk_rate, config_mac_loopback, #endif /* !OSI_STRIPPED_LIB */ -}; +}ivc_cmd; /** * @brief IVC arguments structure. @@ -133,11 +133,11 @@ typedef struct ivc_msg_common { * Status code returned as part of response message of IVC messages. * Status code value is "0" for success and "< 0" for failure. */ - nveu32_t status; + nve32_t status; /** * ID of the CMD. */ - nveu32_t cmd; + ivc_cmd cmd; /** * message count, used for debug */ diff --git a/osi/core/eqos_core.h b/osi/core/eqos_core.h index 38c361a..ef7f51c 100644 --- a/osi/core/eqos_core.h +++ b/osi/core/eqos_core.h @@ -93,8 +93,8 @@ */ #define EQOS_MAC_MCR 0x0000 #define EQOS_MAC_EXTR 0x0004 -#define EQOS_MAC_PFR 0x0008U -#define EQOS_MAC_WATCH 0x000CU +#define EQOS_MAC_PFR 0x0008 +#define EQOS_MAC_WATCH 0x000C #define EQOS_MAC_HTR_REG(x) ((0x0004U * (x)) + 0x0010U) #define EQOS_MAC_VLAN_TAG 0x0050 #define EQOS_MAC_VLANTIR 0x0060 diff --git a/osi/core/eqos_mmc.h b/osi/core/eqos_mmc.h index 45b5dd1..a76630d 100644 --- a/osi/core/eqos_mmc.h +++ b/osi/core/eqos_mmc.h @@ -29,7 +29,7 @@ * @brief MMC HW register offsets * @{ */ -#define MMC_TXOCTETCOUNT_GB 0x00714 +#define MMC_TXOCTETCOUNT_GB 0x00714U #define MMC_TXPACKETCOUNT_GB 0x00718 #define MMC_TXBROADCASTPACKETS_G 0x0071c #define MMC_TXMULTICASTPACKETS_G 0x00720 @@ -112,7 +112,7 @@ #define MMC_RXTCP_GD_OCTETS 0x00878 #define MMC_RXTCP_ERR_OCTETS 0x0087c #define MMC_RXICMP_GD_OCTETS 0x00880 -#define MMC_RXICMP_ERR_OCTETS 0x00884 +#define MMC_RXICMP_ERR_OCTETS 0x00884U /** @} */ void eqos_read_mmc(struct osi_core_priv_data *const osi_core);