Cosmetic fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2748 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@ -44,6 +44,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length)
|
||||
} value;
|
||||
unsigned long sum;
|
||||
unsigned long i;
|
||||
|
||||
/* In the most straight forward way possible,
|
||||
* compute an ip style checksum.
|
||||
*/
|
||||
@ -64,6 +65,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length)
|
||||
}
|
||||
value.byte[0] = sum & 0xff;
|
||||
value.byte[1] = (sum >> 8) & 0xff;
|
||||
|
||||
return (~value.word) & 0xFFFF;
|
||||
}
|
||||
|
||||
@ -78,10 +80,12 @@ static int count_lb_records(struct lb_header *head)
|
||||
{
|
||||
struct lb_record *rec;
|
||||
int count;
|
||||
|
||||
count = 0;
|
||||
for_each_lbrec(head, rec) {
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@ -89,6 +93,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
unsigned long addr;
|
||||
|
||||
/* For now be stupid.... */
|
||||
for (addr = start; addr < end; addr += 16) {
|
||||
struct lb_header *head =
|
||||
@ -123,6 +128,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start,
|
||||
return head;
|
||||
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -131,6 +137,7 @@ static void find_mainboard(struct lb_record *ptr, unsigned long addr)
|
||||
struct lb_mainboard *rec;
|
||||
int max_size;
|
||||
char vendor[256], part[256];
|
||||
|
||||
rec = (struct lb_mainboard *)ptr;
|
||||
max_size = rec->size - sizeof(*rec);
|
||||
printf("vendor id: %.*s part id: %.*s\n",
|
||||
@ -206,5 +213,6 @@ int linuxbios_init(void)
|
||||
printf("No LinuxBIOS table found.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user