[coreboot-gerrit] Change in coreboot[master]: src/device: Fix checkpatch warning: no spaces at the start of a line

Martin Roth (Code Review) gerrit at coreboot.org
Mon Jul 24 04:15:09 CEST 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20730


Change subject: src/device: Fix checkpatch warning: no spaces at the start of a line
......................................................................

src/device: Fix checkpatch warning: no spaces at the start of a line

This excludes some files in the device/oprom/x86emu folder which
are mostly spaces, and which I felt should be handled separately.
debug.c, decode.c, fpu.c, ops.c, ops2.c, & prim_ops.c

Change-Id: I5c12d3fc942c9ad99bbe6e6e54db93e5a8402392
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/device/device_util.c
M src/device/oprom/include/x86emu/fpu_regs.h
M src/device/oprom/include/x86emu/regs.h
M src/device/oprom/include/x86emu/x86emu.h
M src/device/oprom/x86emu/sys.c
M src/device/oprom/yabel/compat/functions.c
M src/device/oprom/yabel/compat/of.h
M src/device/oprom/yabel/compat/rtas.h
M src/device/oprom/yabel/io.c
M src/device/pci_rom.c
10 files changed, 89 insertions(+), 89 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/20730/1

diff --git a/src/device/device_util.c b/src/device/device_util.c
index 859de31..762f0e7 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -812,11 +812,11 @@
 		indent[i] = ' ';
 	indent[i] = '\0';
 
- 	do_printk(BIOS_DEBUG, "%s%s", indent, dev_path(root));
- 	if (root->link_list && root->link_list->children)
- 		do_printk(BIOS_DEBUG, " child on link 0 %s",
- 			  dev_path(root->link_list->children));
- 	do_printk(BIOS_DEBUG, "\n");
+	do_printk(BIOS_DEBUG, "%s%s", indent, dev_path(root));
+	if (root->link_list && root->link_list->children)
+		do_printk(BIOS_DEBUG, " child on link 0 %s",
+			  dev_path(root->link_list->children));
+	do_printk(BIOS_DEBUG, "\n");
 
 	for (res = root->resource_list; res; res = res->next) {
 		do_printk(debug_level, "%s%s resource base %llx size %llx "
diff --git a/src/device/oprom/include/x86emu/fpu_regs.h b/src/device/oprom/include/x86emu/fpu_regs.h
index f49fb1d..a9b4893 100644
--- a/src/device/oprom/include/x86emu/fpu_regs.h
+++ b/src/device/oprom/include/x86emu/fpu_regs.h
@@ -46,11 +46,11 @@
 /* Basic 8087 register can hold any of the following values: */
 
 union x86_fpu_reg_u {
-    s8                  tenbytes[10];
-    double              dval;
-    float               fval;
-    s16                 sval;
-    s32                 lval;
+	s8                  tenbytes[10];
+	double              dval;
+	float               fval;
+	s16                 sval;
+	s32                 lval;
 	};
 
 struct x86_fpu_reg {
@@ -81,10 +81,10 @@
 #define  X86_FPU_STKTOP  0
 
 struct x86_fpu_registers {
-    struct x86_fpu_reg  x86_fpu_stack[8];
-    int                 x86_fpu_flags;
-    int                 x86_fpu_config;         /* rounding modes, etc. */
-    short               x86_fpu_tos, x86_fpu_bos;
+	struct x86_fpu_reg  x86_fpu_stack[8];
+	int                 x86_fpu_flags;
+	int                 x86_fpu_config;         /* rounding modes, etc. */
+	short               x86_fpu_tos, x86_fpu_bos;
 	};
 
 #pragma	pack()
diff --git a/src/device/oprom/include/x86emu/regs.h b/src/device/oprom/include/x86emu/regs.h
index b5fb9e2..8eec112 100644
--- a/src/device/oprom/include/x86emu/regs.h
+++ b/src/device/oprom/include/x86emu/regs.h
@@ -61,7 +61,7 @@
 #ifdef	__BIG_ENDIAN__
 
 typedef struct {
-    u32 e_reg;
+	u32 e_reg;
 	} I32_reg_t;
 
 typedef struct {
@@ -75,7 +75,7 @@
 #else /* !__BIG_ENDIAN__ */
 
 typedef struct {
-    u32 e_reg;
+	u32 e_reg;
 	} I32_reg_t;
 
 typedef struct {
@@ -111,7 +111,7 @@
  */
 
 struct i386_segment_regs {
-    u16 CS, DS, SS, ES, FS, GS;
+	u16 CS, DS, SS, ES, FS, GS;
 	};
 
 /* 8 bit registers */
@@ -260,35 +260,35 @@
 #define  INTR_HALTED          0x4
 
 typedef struct {
-    struct i386_general_regs    gen;
-    struct i386_special_regs    spc;
-    struct i386_segment_regs    seg;
-    /*
-     * MODE contains information on:
-     *  REPE prefix             2 bits  repe,repne
-     *  SEGMENT overrides       5 bits  normal,DS,SS,CS,ES
-     *  Delayed flag set        3 bits  (zero, signed, parity)
-     *  reserved                6 bits
-     *  interrupt #             8 bits  instruction raised interrupt
-     *  BIOS video segregs      4 bits
-     *  Interrupt Pending       1 bits
-     *  Extern interrupt        1 bits
-     *  Halted                  1 bits
-     */
-    u32                         mode;
-    volatile int                intr;   /* mask of pending interrupts */
-    volatile int                         debug;
+	struct i386_general_regs    gen;
+	struct i386_special_regs    spc;
+	struct i386_segment_regs    seg;
+	/*
+	 * MODE contains information on:
+	 *  REPE prefix             2 bits  repe,repne
+	 *  SEGMENT overrides       5 bits  normal,DS,SS,CS,ES
+	 *  Delayed flag set        3 bits  (zero, signed, parity)
+	 *  reserved                6 bits
+	 *  interrupt #             8 bits  instruction raised interrupt
+	 *  BIOS video segregs      4 bits
+	 *  Interrupt Pending       1 bits
+	 *  Extern interrupt        1 bits
+	 *  Halted                  1 bits
+	 */
+	u32                         mode;
+	volatile int                intr;   /* mask of pending interrupts */
+	volatile int                         debug;
 #if IS_ENABLED(CONFIG_X86EMU_DEBUG)
-    int                         check;
-    u16                         saved_ip;
-    u16                         saved_cs;
-    int                         enc_pos;
-    int                         enc_str_pos;
-    char                        decode_buf[32]; /* encoded byte stream  */
-    char                        decoded_buf[256]; /* disassembled strings */
+	int                         check;
+	u16                         saved_ip;
+	u16                         saved_cs;
+	int                         enc_pos;
+	int                         enc_str_pos;
+	char                        decode_buf[32]; /* encoded byte stream  */
+	char                        decoded_buf[256]; /* disassembled strings */
 #endif
-    u8                          intno;
-    u8                          __pad[3];
+	u8                          intno;
+	u8                          __pad[3];
 	} X86EMU_regs;
 
 /****************************************************************************
diff --git a/src/device/oprom/include/x86emu/x86emu.h b/src/device/oprom/include/x86emu/x86emu.h
index 3d1b949..a5d436a 100644
--- a/src/device/oprom/include/x86emu/x86emu.h
+++ b/src/device/oprom/include/x86emu/x86emu.h
@@ -155,7 +155,7 @@
 
 #if IS_ENABLED(CONFIG_X86EMU_DEBUG)
 #define	HALT_SYS()	\
-    	printf("halt_sys: in %s\n", __func__);	\
+	printf("halt_sys: in %s\n", __func__);	\
 	X86EMU_halt_sys();
 #else
 #define	HALT_SYS()	X86EMU_halt_sys()
diff --git a/src/device/oprom/x86emu/sys.c b/src/device/oprom/x86emu/sys.c
index afb7efb..9c293bc 100644
--- a/src/device/oprom/x86emu/sys.c
+++ b/src/device/oprom/x86emu/sys.c
@@ -138,7 +138,7 @@
 	u8 *ptr;
 
 	ptr = mem_ptr(addr, 4);
-       	val = *(u32 *) (ptr);
+	val = *(u32 *) (ptr);
 
 	DB(if (DEBUG_MEM_TRACE())
 	   printf("%#08x 4 -> %#x\n", addr, val);)
diff --git a/src/device/oprom/yabel/compat/functions.c b/src/device/oprom/yabel/compat/functions.c
index 5a51f18..1cebdf0 100644
--- a/src/device/oprom/yabel/compat/functions.c
+++ b/src/device/oprom/yabel/compat/functions.c
@@ -72,15 +72,15 @@
 
 u64 get_time(void)
 {
-    u64 act = 0;
+	u64 act = 0;
 #if IS_ENABLED(CONFIG_ARCH_X86)
-    u32 eax, edx;
+	u32 eax, edx;
 
-    __asm__ __volatile__(
-	"rdtsc"
-        : "=a"(eax), "=d"(edx)
-        : /* no inputs, no clobber */);
-    act = ((u64) edx << 32) | eax;
+	__asm__ __volatile__(
+		"rdtsc"
+		: "=a"(eax), "=d"(edx)
+		: /* no inputs, no clobber */);
+	act = ((u64) edx << 32) | eax;
 #endif
-    return act;
+	return act;
 }
diff --git a/src/device/oprom/yabel/compat/of.h b/src/device/oprom/yabel/compat/of.h
index ac13af2..31c9b59 100644
--- a/src/device/oprom/yabel/compat/of.h
+++ b/src/device/oprom/yabel/compat/of.h
@@ -42,10 +42,10 @@
 
 typedef struct
 {
-    unsigned int serv;
-    int nargs;
-    int nrets;
-    unsigned int args[16];
+	unsigned int serv;
+	int nargs;
+	int nrets;
+	unsigned int args[16];
 } of_arg_t;
 
 
diff --git a/src/device/oprom/yabel/compat/rtas.h b/src/device/oprom/yabel/compat/rtas.h
index f701cc6..ccad9e9 100644
--- a/src/device/oprom/yabel/compat/rtas.h
+++ b/src/device/oprom/yabel/compat/rtas.h
@@ -38,13 +38,13 @@
 #include "of.h"
 
 typedef struct dtime {
-        unsigned int year;
-        unsigned int month;
-        unsigned int day;
-        unsigned int hour;
-        unsigned int minute;
-        unsigned int second;
-        unsigned int nano;
+	unsigned int year;
+	unsigned int month;
+	unsigned int day;
+	unsigned int hour;
+	unsigned int minute;
+	unsigned int second;
+	unsigned int nano;
 } dtime;
 
 typedef void (*thread_t) (int);
diff --git a/src/device/oprom/yabel/io.c b/src/device/oprom/yabel/io.c
index d673801..b50a2f1 100644
--- a/src/device/oprom/yabel/io.c
+++ b/src/device/oprom/yabel/io.c
@@ -101,47 +101,47 @@
 static unsigned int
 read_io(void *addr, size_t sz)
 {
-        unsigned int ret;
+	unsigned int ret;
 	/* since we are using inb instructions, we need the port number as 16bit value */
 	u16 port = (u16)(u32) addr;
 
-        switch (sz) {
-        case 1:
+	switch (sz) {
+	case 1:
 		ret = inb(port);
-                break;
-        case 2:
+		break;
+	case 2:
 		ret = inw(port);
-                break;
-        case 4:
+		break;
+	case 4:
 		ret = inl(port);
-                break;
-        default:
-                ret = 0;
-        }
+		break;
+	default:
+		ret = 0;
+	}
 
-        return ret;
+	return ret;
 }
 
 static int
 write_io(void *addr, unsigned int value, size_t sz)
 {
 	u16 port = (u16)(u32) addr;
-        switch (sz) {
+	switch (sz) {
 	/* since we are using inb instructions, we need the port number as 16bit value */
-        case 1:
+	case 1:
 		outb(value, port);
-                break;
-        case 2:
+		break;
+	case 2:
 		outw(value, port);
-                break;
-        case 4:
+		break;
+	case 4:
 		outl(value, port);
-                break;
-        default:
-                return -1;
-        }
+		break;
+	default:
+		return -1;
+	}
 
-        return 0;
+	return 0;
 }
 
 u32 pci_cfg_read(X86EMU_pioAddr addr, u8 size);
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 6456d17..a411f06 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -148,7 +148,7 @@
 	 * whether the ROM image is for a VGA device because some
 	 * devices have a mismatch between the hardware and the ROM.
 	 */
- 	if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) {
+	if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) {
 #if !IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS)
 		extern device_t vga_pri; /* Primary VGA device (device.c). */
 		if (dev != vga_pri) return NULL; /* Only one VGA supported. */

-- 
To view, visit https://review.coreboot.org/20730
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c12d3fc942c9ad99bbe6e6e54db93e5a8402392
Gerrit-Change-Number: 20730
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170724/81420af0/attachment-0001.html>


More information about the coreboot-gerrit mailing list