From f4c4ab9826b521666d5ba887e69a636428ac9eb2 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Thu, 16 Mar 2017 17:08:03 -0700 Subject: soc/intel/skylake: Fix remaining issues detected by checkpatch Fix the following errors and warnings detected by checkpatch.pl: ERROR: code indent should use tabs where possible ERROR: Macros with complex values should be enclosed in parentheses ERROR: "foo * bar" should be "foo *bar" ERROR: space required before the open parenthesis '(' ERROR: spaces required around that '=' (ctx:VxW) WARNING: space prohibited between function name and open parenthesis '(' WARNING: storage class should be at the beginning of the declaration WARNING: char * array declaration might be better as static const WARNING: please, no space before tabs WARNING: braces {} are not necessary for single statement blocks WARNING: else is not generally useful after a break or return WARNING: static const char * array should probably be static const char * const TEST=Build for glados Change-Id: Ic14ca3abd193cfe257504a55ab6b74782b26bf6d Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18868 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie --- src/soc/intel/skylake/me.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/soc/intel/skylake/me.c') diff --git a/src/soc/intel/skylake/me.c b/src/soc/intel/skylake/me.c index dd734077ce..577437291f 100644 --- a/src/soc/intel/skylake/me.c +++ b/src/soc/intel/skylake/me.c @@ -49,7 +49,7 @@ static inline void me_write_mmio32(u16 offset, u32 value) } /* HFSTS1[3:0] Current Working State Values */ -static const char *me_cws_values[] = { +static const char * const me_cws_values[] = { [ME_HFS_CWS_RESET] = "Reset", [ME_HFS_CWS_INIT] = "Initializing", [ME_HFS_CWS_REC] = "Recovery", @@ -69,7 +69,7 @@ static const char *me_cws_values[] = { }; /* HFSTS1[8:6] Current Operation State Values */ -static const char *me_opstate_values[] = { +static const char * const me_opstate_values[] = { [ME_HFS_STATE_PREBOOT] = "Preboot", [ME_HFS_STATE_M0_UMA] = "M0 with UMA", [ME_HFS_STATE_M3] = "M3 without UMA", @@ -79,7 +79,7 @@ static const char *me_opstate_values[] = { }; /* HFSTS1[19:16] Current Operation Mode Values */ -static const char *me_opmode_values[] = { +static const char * const me_opmode_values[] = { [ME_HFS_MODE_NORMAL] = "Normal", [ME_HFS_MODE_DEBUG] = "Debug", [ME_HFS_MODE_DIS] = "Soft Temporary Disable", @@ -88,7 +88,7 @@ static const char *me_opmode_values[] = { }; /* HFSTS1[15:12] Error Code Values */ -static const char *me_error_values[] = { +static const char * const me_error_values[] = { [ME_HFS_ERROR_NONE] = "No Error", [ME_HFS_ERROR_UNCAT] = "Uncategorized Failure", [ME_HFS_ERROR_IMAGE] = "Image Failure", @@ -96,7 +96,7 @@ static const char *me_error_values[] = { }; /* HFSTS2[31:28] ME Progress Code */ -static const char *me_progress_values[] = { +static const char * const me_progress_values[] = { [ME_HFS2_PHASE_ROM] = "ROM Phase", [1] = "Unknown (1)", [ME_HFS2_PHASE_UKERNEL] = "uKernel Phase", @@ -109,7 +109,7 @@ static const char *me_progress_values[] = { }; /* HFSTS2[27:24] Power Management Event */ -static const char *me_pmevent_values[] = { +static const char * const me_pmevent_values[] = { [ME_HFS2_PMEVENT_CLEAN_MOFF_MX_WAKE] = "Clean Moff->Mx wake", [ME_HFS2_PMEVENT_MOFF_MX_WAKE_ERROR] = @@ -146,13 +146,13 @@ static const char *me_pmevent_values[] = { }; /* Progress Code 0 states */ -static const char *me_progress_rom_values[] = { +static const char * const me_progress_rom_values[] = { [ME_HFS2_STATE_ROM_BEGIN] = "BEGIN", [ME_HFS2_STATE_ROM_DISABLE] = "DISABLE" }; /* Progress Code 1 states */ -static const char *me_progress_bup_values[] = { +static const char * const me_progress_bup_values[] = { [ME_HFS2_STATE_BUP_INIT] = "Initialization starts", [ME_HFS2_STATE_BUP_DIS_HOST_WAKE] = @@ -585,7 +585,7 @@ send_heci_message(void *msg, int len, u8 hostaddress, u8 clientaddress) } static int -recv_heci_message(void *message, u32 * message_size) +recv_heci_message(void *message, u32 *message_size) { union mei_header head; int cur = 0; @@ -652,7 +652,7 @@ static int send_heci_reset_message(void) }; u32 reply_size; - status= send_heci_message(&msg, sizeof(msg), + status = send_heci_message(&msg, sizeof(msg), BIOS_HOST_ADD, HECI_MKHI_ADD); if (status != 0) return -1; @@ -664,10 +664,9 @@ static int send_heci_reset_message(void) if (reply.result != 0) { printk(BIOS_DEBUG, "%s: Exit with Failure\n", __func__); return -1; - } else { - printk(BIOS_DEBUG, "%s: Exit with Success\n", __func__); - return 0; } + printk(BIOS_DEBUG, "%s: Exit with Success\n", __func__); + return 0; } int send_global_reset(void) -- cgit v1.2.3