fix a whole bunch of warnings. (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2890 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/arch/i386/boot/linuxbios_table.c b/src/arch/i386/boot/linuxbios_table.c
index 9074d11..e32d246 100644
--- a/src/arch/i386/boot/linuxbios_table.c
+++ b/src/arch/i386/boot/linuxbios_table.c
@@ -120,7 +120,7 @@
{
static const struct {
uint32_t tag;
- const uint8_t *string;
+ const char *string;
} strings[] = {
{ LB_TAG_VERSION, linuxbios_version, },
{ LB_TAG_EXTRA_VERSION, linuxbios_extra_version, },
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c
index 79ddd07..29fcc13 100644
--- a/src/arch/i386/boot/tables.c
+++ b/src/arch/i386/boot/tables.c
@@ -8,6 +8,7 @@
#include <arch/pirq_routing.h>
#include <arch/smp/mpspec.h>
#include <arch/acpi.h>
+#include <string.h>
#include "linuxbios_table.h"
// Global Descriptor Table, defined in c_start.S
diff --git a/src/boot/elfboot.c b/src/boot/elfboot.c
index 9050d7b..6f307ed 100644
--- a/src/boot/elfboot.c
+++ b/src/boot/elfboot.c
@@ -144,7 +144,7 @@
{
struct verify_callback *cb_chain;
unsigned char *note, *end;
- char *program, *version;
+ unsigned char *program, *version;
cb_chain = 0;
note = header + offset;
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c
index ab28a23..1a9e9d4 100644
--- a/src/cpu/x86/mtrr/mtrr.c
+++ b/src/cpu/x86/mtrr/mtrr.c
@@ -349,7 +349,6 @@
* mtrrs. If this doesn't work out we can get smart again
* and clear out the mtrrs.
*/
- struct var_mtrr_state var_state;
printk_debug("\n");
/* Initialized the fixed_mtrrs to uncached */
diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c
index eaf85d2..a791f79 100644
--- a/src/cpu/x86/tsc/delay_tsc.c
+++ b/src/cpu/x86/tsc/delay_tsc.c
@@ -102,8 +102,7 @@
static unsigned long long calibrate_tsc(void)
{
unsigned long long start, end, delta;
- unsigned long allones = (unsigned long) -1, result;
- unsigned long count;
+ unsigned long result, count;
start = rdtscll();
// no udivdi3, dammit.
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index efb1f0f..c6ef541 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -454,7 +454,7 @@
void report_resource_stored(device_t dev, struct resource *resource, const char *comment)
{
if (resource->flags & IORESOURCE_STORED) {
- unsigned char buf[10];
+ char buf[10];
unsigned long long base, end;
base = resource->base;
end = resource_end(resource);
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index 9846794..01096d0 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -37,6 +37,9 @@
#include <part/hard_reset.h>
#include <part/fallback_boot.h>
+/* The hypertransport link is already optimized in pre-ram code
+ * so don't do it again
+ */
#define OPT_HT_LINK 0
#if OPT_HT_LINK == 1
@@ -123,15 +126,17 @@
static int ht_setup_link(struct ht_link *prev, device_t dev, unsigned pos)
{
+#if OPT_HT_LINK == 1
static const uint8_t link_width_to_pow2[]= { 3, 4, 0, 5, 1, 2, 0, 0 };
static const uint8_t pow2_to_link_width[] = { 0x7, 4, 5, 0, 1, 3 };
- struct ht_link cur[1];
unsigned present_width_cap, upstream_width_cap;
unsigned present_freq_cap, upstream_freq_cap;
unsigned ln_present_width_in, ln_upstream_width_in;
unsigned ln_present_width_out, ln_upstream_width_out;
unsigned freq, old_freq;
unsigned present_width, upstream_width, old_width;
+#endif
+ struct ht_link cur[1];
int reset_needed;
int linkb_to_host;
@@ -485,7 +490,7 @@
next_unitid = HT_CHAIN_END_UNITID_BASE;
end_used = 1;
} else {
- goto out;
+ goto end_of_chain;
}
}
@@ -535,7 +540,6 @@
(dev->enabled? "enabled": "disabled"), next_unitid);
} while (last_unitid != next_unitid);
- out:
end_of_chain:
#if OPT_HT_LINK == 1
if(bus->reset_needed) {