From da36bcf0d4334695b797166b865006842a1ae7e2 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 9 Sep 2013 11:20:47 -0700 Subject: [PATCH] qemu-armv7/media.c: fix coding style Change-Id: I01a11923fc1b250afeed36acc20793fd072421ba Signed-off-by: Stefan Reinauer Reviewed-on: https://chromium-review.googlesource.com/168574 Reviewed-by: Gabe Black (cherry picked from commit 46b5f64096c55d0d9627cb9537fc4910e1bddcd9) Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/6520 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/mainboard/emulation/qemu-armv7/media.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/mainboard/emulation/qemu-armv7/media.c b/src/mainboard/emulation/qemu-armv7/media.c index d024b5d340..11688817ff 100644 --- a/src/mainboard/emulation/qemu-armv7/media.c +++ b/src/mainboard/emulation/qemu-armv7/media.c @@ -18,32 +18,39 @@ /* Simple memory-mapped ROM emulation. */ -static int emu_rom_open(struct cbfs_media *media) { +static int emu_rom_open(struct cbfs_media *media) +{ return 0; } -static void *emu_rom_map(struct cbfs_media *media, size_t offset, size_t count) { +static void *emu_rom_map(struct cbfs_media *media, size_t offset, size_t count) +{ return (void*)(offset + CONFIG_BOOTBLOCK_BASE); } -static void *emu_rom_unmap(struct cbfs_media *media, const void *address) { +static void *emu_rom_unmap(struct cbfs_media *media, const void *address) +{ return NULL; } static size_t emu_rom_read(struct cbfs_media *media, void *dest, size_t offset, - size_t count) { + size_t count) +{ void *ptr = emu_rom_map(media, offset, count); memcpy(dest, ptr, count); emu_rom_unmap(media, ptr); return count; } -static int emu_rom_close(struct cbfs_media *media) { +static int emu_rom_close(struct cbfs_media *media) +{ return 0; } int init_emu_rom_cbfs_media(struct cbfs_media *media); -int init_emu_rom_cbfs_media(struct cbfs_media *media) { + +int init_emu_rom_cbfs_media(struct cbfs_media *media) +{ media->open = emu_rom_open; media->close = emu_rom_close; media->map = emu_rom_map; @@ -52,6 +59,7 @@ int init_emu_rom_cbfs_media(struct cbfs_media *media) { return 0; } -int init_default_cbfs_media(struct cbfs_media *media) { +int init_default_cbfs_media(struct cbfs_media *media) +{ return init_emu_rom_cbfs_media(media); }