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 <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18868
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Lee Leahy
2017-03-16 17:08:03 -07:00
parent b439a92939
commit f4c4ab9826
11 changed files with 27 additions and 29 deletions

View File

@@ -41,7 +41,7 @@
#include "chip.h"
/* Print status bits with descriptive names */
static void print_status_bits(u32 status, const char *bit_names[])
static void print_status_bits(u32 status, const char * const bit_names[])
{
int i;
@@ -109,7 +109,7 @@ static u16 reset_pm1_status(void)
/* Print PM1 status bits */
static u16 print_pm1_status(u16 pm1_sts)
{
const char *pm1_sts_bits[] = {
static const char * const pm1_sts_bits[] = {
[0] = "TMROF",
[4] = "BM",
[5] = "GBL",
@@ -158,7 +158,7 @@ static u32 reset_smi_status(void)
/* Print SMI status bits */
static u32 print_smi_status(u32 smi_sts)
{
const char *smi_sts_bits[] = {
static const char * const smi_sts_bits[] = {
[2] = "BIOS",
[3] = "LEGACY_USB",
[4] = "SLP_SMI",
@@ -245,7 +245,7 @@ static u32 reset_tco_status(void)
/* Print TCO status bits */
static u32 print_tco_status(u32 tco_sts)
{
const char *tco_sts_bits[] = {
static const char * const tco_sts_bits[] = {
[0] = "NMI2SMI",
[1] = "SW_TCO",
[2] = "TCO_INT",
@@ -306,7 +306,7 @@ static u32 reset_gpe(u16 sts_reg, u16 en_reg)
}
/* Print GPE0 status bits */
static u32 print_gpe_status(u32 gpe0_sts, const char *bit_names[])
static u32 print_gpe_status(u32 gpe0_sts, const char * const bit_names[])
{
if (!gpe0_sts)
return 0;
@@ -334,7 +334,7 @@ static u32 print_gpe_gpio(u32 gpe0_sts, int start)
/* Clear all GPE status and return "standard" GPE event status */
u32 clear_gpe_status(void)
{
const char *gpe0_sts_3_bits[] = {
static const char * const gpe0_sts_3_bits[] = {
[1] = "HOTPLUG",
[2] = "SWGPE",
[6] = "TCO_SCI",