From 09e16dc21597d20f215c822d63f8409271baacca Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 14 Jan 2013 10:20:15 -0800 Subject: [PATCH] libpayload: Style fixes Change-Id: Ic3164fbffd8da6bd9d506d80e425ad89efc0f1af Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/2144 Tested-by: build bot (Jenkins) Reviewed-by: Dave Frodin Reviewed-by: Martin Roth Reviewed-by: Anton Kochkov --- payloads/libpayload/libcbfs/cbfs.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/payloads/libpayload/libcbfs/cbfs.c b/payloads/libpayload/libcbfs/cbfs.c index fd4cfb2319..026b73c965 100644 --- a/payloads/libpayload/libcbfs/cbfs.c +++ b/payloads/libpayload/libcbfs/cbfs.c @@ -47,11 +47,13 @@ uint32_t romstart(void); uint32_t romend(void); #include -static uint32_t host_virt_to_phys(void *addr) { +static uint32_t host_virt_to_phys(void *addr) +{ return virt_to_phys(addr); } -static void *host_phys_to_virt(uint32_t addr) { +static void *host_phys_to_virt(uint32_t addr) +{ return phys_to_virt(addr); } #undef virt_to_phys @@ -78,11 +80,13 @@ uint32_t romend(void) static uint32_t ram_cbfs_offset; -static uint32_t ram_virt_to_phys(void *addr) { +static uint32_t ram_virt_to_phys(void *addr) +{ return (uint32_t)addr - ram_cbfs_offset; } -static void *ram_phys_to_virt(uint32_t addr) { +static void *ram_phys_to_virt(uint32_t addr) +{ return (void*)addr + ram_cbfs_offset; } @@ -94,7 +98,7 @@ void setup_cbfs_from_ram(void* start, uint32_t size) phys_to_virt = ram_phys_to_virt; } -void setup_cbfs_from_flash() +void setup_cbfs_from_flash(void) { virt_to_phys = host_virt_to_phys; phys_to_virt = host_phys_to_virt;