[coreboot] [v2] r4179 - in trunk/coreboot-v2/src: arch/i386/boot console pc80 stream

svn at coreboot.org svn at coreboot.org
Wed Apr 22 18:23:47 CEST 2009


Author: stepan
Date: 2009-04-22 18:23:47 +0200 (Wed, 22 Apr 2009)
New Revision: 4179

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/acpigen.c
   trunk/coreboot-v2/src/arch/i386/boot/tables.c
   trunk/coreboot-v2/src/console/console.c
   trunk/coreboot-v2/src/pc80/mc146818rtc_early.c
   trunk/coreboot-v2/src/stream/rom_stream.c
Log:
fix warnings, shadowed declarations and style guide violations (all trivial)

Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/arch/i386/boot/acpigen.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/acpigen.c	2009-04-22 15:49:28 UTC (rev 4178)
+++ trunk/coreboot-v2/src/arch/i386/boot/acpigen.c	2009-04-22 16:23:47 UTC (rev 4179)
@@ -34,10 +34,10 @@
 char *len_stack[ACPIGEN_LENSTACK_SIZE];
 int ltop = 0;
 
-static int acpigen_write_len_f()
+static int acpigen_write_len_f(void)
 {
 	ASSERT(ltop < (ACPIGEN_LENSTACK_SIZE - 1))
-	len_stack[ltop++] = gencurrent;
+	    len_stack[ltop++] = gencurrent;
 	acpigen_emit_byte(0);
 	acpigen_emit_byte(0);
 	return 2;
@@ -46,7 +46,7 @@
 void acpigen_patch_len(int len)
 {
 	ASSERT(len <= ACPIGEN_MAXLEN)
-	ASSERT(ltop > 0)
+	    ASSERT(ltop > 0)
 	char *p = len_stack[--ltop];
 	/* generate store length for 0xfff max */
 	p[0] = (0x40 | (len & 0xf));
@@ -54,12 +54,14 @@
 
 }
 
-void acpigen_set_current(char *curr) {
-    gencurrent = curr;
+void acpigen_set_current(char *curr)
+{
+	gencurrent = curr;
 }
 
-char *acpigen_get_current(void) {
-    return gencurrent;
+char *acpigen_get_current(void)
+{
+	return gencurrent;
 }
 
 int acpigen_emit_byte(unsigned char b)
@@ -112,28 +114,32 @@
 	return 9;
 }
 
-int acpigen_write_name_byte(char *name, uint8_t val) {
+int acpigen_write_name_byte(char *name, uint8_t val)
+{
 	int len;
 	len = acpigen_write_name(name);
 	len += acpigen_write_byte(val);
 	return len;
 }
 
-int acpigen_write_name_dword(char *name, uint32_t val) {
+int acpigen_write_name_dword(char *name, uint32_t val)
+{
 	int len;
 	len = acpigen_write_name(name);
 	len += acpigen_write_dword(val);
 	return len;
 }
 
-int acpigen_write_name_qword(char *name, uint64_t val) {
+int acpigen_write_name_qword(char *name, uint64_t val)
+{
 	int len;
 	len = acpigen_write_name(name);
 	len += acpigen_write_qword(val);
 	return len;
 }
 
-int acpigen_emit_stream(char *data, int size) {
+int acpigen_emit_stream(char *data, int size)
+{
 	int i;
 	for (i = 0; i < size; i++) {
 		acpigen_emit_byte(data[i]);
@@ -166,7 +172,7 @@
         {
 */
 	char pscope[16];
-	int  len;
+	int len;
 	/* processor op */
 	acpigen_emit_byte(0x5b);
 	acpigen_emit_byte(0x83);
@@ -180,7 +186,7 @@
 	acpigen_emit_byte((pblock_addr >> 16) & 0xff);
 	acpigen_emit_byte((pblock_addr >> 24) & 0xff);
 	acpigen_emit_byte(pblock_len);
-	return 6  + 2 + len;
+	return 6 + 2 + len;
 }
 
 int acpigen_write_empty_PCT(void)
@@ -245,8 +251,8 @@
 	return len;
 }
 
-int acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat,
-			u32 control, u32 status)
+int acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat,
+			      u32 busmLat, u32 control, u32 status)
 {
 	int len;
 	len = acpigen_write_package(6);
@@ -267,14 +273,13 @@
 	lenh = acpigen_write_name("_PSD");
 	lenp = acpigen_write_package(1);
 	len = acpigen_write_package(5);
-	len += acpigen_write_byte(5); // 5 values
-	len += acpigen_write_byte(0); // revision 0
+	len += acpigen_write_byte(5);	// 5 values
+	len += acpigen_write_byte(0);	// revision 0
 	len += acpigen_write_dword(domain);
 	len += acpigen_write_dword(coordtype);
 	len += acpigen_write_dword(numprocs);
-	acpigen_patch_len(len-1);
+	acpigen_patch_len(len - 1);
 	len += lenp;
-	acpigen_patch_len(len-1);
+	acpigen_patch_len(len - 1);
 	return len + lenh;
 }
-

Modified: trunk/coreboot-v2/src/arch/i386/boot/tables.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-04-22 15:49:28 UTC (rev 4178)
+++ trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-04-22 16:23:47 UTC (rev 4179)
@@ -75,7 +75,7 @@
 	 * low and the high area, so payloads and OSes don't need to know about
 	 * the high tables.
 	 */
-	unsigned long high_table_start, high_table_end=0;
+	unsigned long high_table_start=0, high_table_end=0;
 
 	if (high_tables_base) {
 		printk_debug("High Tables Base is %llx.\n", high_tables_base);

Modified: trunk/coreboot-v2/src/console/console.c
===================================================================
--- trunk/coreboot-v2/src/console/console.c	2009-04-22 15:49:28 UTC (rev 4178)
+++ trunk/coreboot-v2/src/console/console.c	2009-04-22 16:23:47 UTC (rev 4179)
@@ -83,7 +83,7 @@
  */
 void post_code(uint8_t value)
 {
-#if NO_POST==0
+#if !defined(NO_POST) || NO_POST==0
 #if CONFIG_SERIAL_POST==1
 	printk_emerg("POST: 0x%02x\n", value);
 #endif

Modified: trunk/coreboot-v2/src/pc80/mc146818rtc_early.c
===================================================================
--- trunk/coreboot-v2/src/pc80/mc146818rtc_early.c	2009-04-22 15:49:28 UTC (rev 4178)
+++ trunk/coreboot-v2/src/pc80/mc146818rtc_early.c	2009-04-22 16:23:47 UTC (rev 4179)
@@ -69,8 +69,7 @@
 	unsigned char byte;
 
 	if (cmos_error() || !cmos_chksum_valid()) {
-		unsigned char byte;
-		/* There are no impossible values, no cheksums so just
+		/* There are no impossible values, no checksums so just
 		 * trust whatever value we have in the the cmos,
 		 * but clear the fallback bit.
 		 */

Modified: trunk/coreboot-v2/src/stream/rom_stream.c
===================================================================
--- trunk/coreboot-v2/src/stream/rom_stream.c	2009-04-22 15:49:28 UTC (rev 4178)
+++ trunk/coreboot-v2/src/stream/rom_stream.c	2009-04-22 16:23:47 UTC (rev 4179)
@@ -21,7 +21,7 @@
 #endif
 
 #if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-#if HAVE_UNCOMPRESSER
+#ifdef HAVE_UNCOMPRESSER
 #error "You're defining more than one compression type, which is not allowed."
 #endif
 #define HAVE_UNCOMPRESSER 1
@@ -49,17 +49,18 @@
 
 #ifdef UNCOMPRESSER
 unsigned long 
-uncompress(uint8_t * rom_start, uint8_t *dest )
+uncompress(uint8_t * start_addr, uint8_t *dest_addr)
 {
 #if (CONFIG_COMPRESSED_PAYLOAD_NRV2B) 
 	unsigned long ilen; // used compressed stream length
-	return unrv2b(rom_start, dest, &ilen);
+	return unrv2b(start_addr, dest_addr, &ilen);
 #endif
 #if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-	return ulzma(rom_start, dest);
+	return ulzma(start_addr, dest_addr);
 #endif
 }
 #endif
+
 int stream_init(void)
 {
 #ifdef UNCOMPRESSER





More information about the coreboot mailing list