Trivial:
* include cleanup. We don't provide stdint.h, so use arch/types.h instead. * drop some unused variables * fix comment style in some headers to match the template * Fix the loglevel of some debugging output. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@275 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
afa7c1d798
commit
bea6044faa
18 changed files with 183 additions and 149 deletions
|
|
@ -19,13 +19,13 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <arch/types.h>
|
||||
#include <ip_checksum.h>
|
||||
#include <string.h>
|
||||
|
||||
unsigned long compute_ip_checksum(void *addr, unsigned long length)
|
||||
{
|
||||
uint16_t *ptr;
|
||||
u16 *ptr;
|
||||
unsigned long sum;
|
||||
unsigned long len;
|
||||
unsigned long laddr;
|
||||
|
|
@ -33,7 +33,7 @@ unsigned long compute_ip_checksum(void *addr, unsigned long length)
|
|||
laddr = (unsigned long )addr;
|
||||
sum = 0;
|
||||
if (laddr & 1) {
|
||||
uint16_t buffer;
|
||||
u16 buffer;
|
||||
unsigned char *ptr;
|
||||
/* copy the first byte into a 2 byte buffer.
|
||||
* This way automatically handles the endian question
|
||||
|
|
@ -58,7 +58,7 @@ unsigned long compute_ip_checksum(void *addr, unsigned long length)
|
|||
}
|
||||
addr = ptr;
|
||||
if (length & 1) {
|
||||
uint16_t buffer;
|
||||
u16 buffer;
|
||||
unsigned char *ptr;
|
||||
/* copy the last byte into a 2 byte buffer.
|
||||
* This way automatically handles the endian question
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
* no calls to malloc
|
||||
*/
|
||||
|
||||
#include <arch/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <console/console.h>
|
||||
#include <linuxbios_tables.h>
|
||||
#include <elf.h>
|
||||
#include <elf_boot.h>
|
||||
#include <linuxbios_tables.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int valid_area(struct lb_memory *mem,
|
||||
unsigned long start, unsigned long len)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
* has had this at some time or other.
|
||||
*/
|
||||
|
||||
#include <arch/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <console/console.h>
|
||||
|
||||
|
|
@ -51,11 +52,11 @@ void *malloc(size_t size)
|
|||
{
|
||||
void *p;
|
||||
|
||||
MALLOCDBG("%s Enter, size %d, free_mem_ptr %p\n", __FUNCTION__, size,
|
||||
free_mem_ptr);
|
||||
MALLOCDBG("%s Enter, size %d, free_mem_ptr %p\n",
|
||||
__FUNCTION__, size, free_mem_ptr);
|
||||
|
||||
if (size > freebytes) {
|
||||
die("OUT OF MEMORY\n");
|
||||
die("Out of memory.\n");
|
||||
}
|
||||
|
||||
size = (size + 3) & (~3); /* Align */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue