Asami Doi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31938
Change subject: src/arch/mips: Fix checkpatch warnings and errors ......................................................................
src/arch/mips: Fix checkpatch warnings and errors
Change-Id: Ic859913b93dc8ed6ff64b551c8a6baf72d28c75a Signed-off-by: Asami Doi d0iasm.pub@gmail.com --- M src/arch/mips/ashldi3.c M src/arch/mips/boot.c M src/arch/mips/bootblock_simple.c M src/arch/mips/include/arch/memlayout.h 4 files changed, 7 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/31938/1
diff --git a/src/arch/mips/ashldi3.c b/src/arch/mips/ashldi3.c index 9ee40efa..f68d78e 100644 --- a/src/arch/mips/ashldi3.c +++ b/src/arch/mips/ashldi3.c @@ -19,7 +19,7 @@ #errror "What endian are you!?" #endif
-typedef unsigned word_type; +typedef unsigned int word_type; long long __ashldi3(long long u, word_type b);
struct DWstruct { diff --git a/src/arch/mips/boot.c b/src/arch/mips/boot.c index 5ab36ec..3857036 100644 --- a/src/arch/mips/boot.c +++ b/src/arch/mips/boot.c @@ -19,7 +19,7 @@ void arch_prog_run(struct prog *prog) { void *cb_tables = prog_entry_arg(prog); - void (*doit)(void *) = prog_entry(prog); + void *doit = (void *)prog_entry(prog);
doit(cb_tables); } diff --git a/src/arch/mips/bootblock_simple.c b/src/arch/mips/bootblock_simple.c index 40987d8..367dd6c 100644 --- a/src/arch/mips/bootblock_simple.c +++ b/src/arch/mips/bootblock_simple.c @@ -34,8 +34,8 @@
if (init_extra_hardware()) { printk(BIOS_ERR, "bootblock_simple: failed to init HW.\n"); - } else { + else run_romstage(); - } + halt(); } diff --git a/src/arch/mips/include/arch/memlayout.h b/src/arch/mips/include/arch/memlayout.h index fe05bd8..099531d 100644 --- a/src/arch/mips/include/arch/memlayout.h +++ b/src/arch/mips/include/arch/memlayout.h @@ -21,8 +21,10 @@ /* MIPS stacks need 8-byte alignment and stay in one place through ramstage. */ /* TODO: Double-check that that's the correct alignment for our ABI. */ #define STACK(addr, size) \ +do { \ REGION(stack, addr, size, 8) \ - _ = ASSERT(size >= 2K, "stack should be >= 2K, see toolchain.inc"); + _ = ASSERT(size >= 2K, "stack should be >= 2K, see toolchain.inc") \ +} while (0)
#define DMA_COHERENT(addr, size) REGION(dma_coherent, addr, size, 4K)
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31938
to look at the new patch set (#2).
Change subject: src/arch/mips: Fix checkpatch warnings and errors ......................................................................
src/arch/mips: Fix checkpatch warnings and errors
This patch will fix these checkpatch errors in src/arch/mips/. - src/arch/mips/ashldi3.c:22: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' - src/arch/mips/boot.c:22: WARNING: function definition argument 'void *' should also have an identifier name - src/arch/mips/bootblock_simple.c:35: WARNING: braces {} are not necessary for any arm of this statement - src/arch/mips/include/arch/memlayout.h:23: ERROR: Macros with multiple statements should be enclosed in a do - while loop - src/arch/mips/include/arch/memlayout.h:23: WARNING: macros should not use a trailing semicolon
Change-Id: Ic859913b93dc8ed6ff64b551c8a6baf72d28c75a Signed-off-by: Asami Doi d0iasm.pub@gmail.com --- M src/arch/mips/ashldi3.c M src/arch/mips/boot.c M src/arch/mips/bootblock_simple.c M src/arch/mips/include/arch/memlayout.h 4 files changed, 7 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/31938/2
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31938
to look at the new patch set (#3).
Change subject: src/arch/mips: [WIP] Fix checkpatch warnings and errors ......................................................................
src/arch/mips: [WIP] Fix checkpatch warnings and errors
This patch will fix these checkpatch errors in src/arch/mips/. - src/arch/mips/ashldi3.c:22: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' - src/arch/mips/boot.c:22: WARNING: function definition argument 'void *' should also have an identifier name - src/arch/mips/bootblock_simple.c:35: WARNING: braces {} are not necessary for any arm of this statement - src/arch/mips/include/arch/memlayout.h:23: ERROR: Macros with multiple statements should be enclosed in a do - while loop - src/arch/mips/include/arch/memlayout.h:23: WARNING: macros should not use a trailing semicolon
Change-Id: Ic859913b93dc8ed6ff64b551c8a6baf72d28c75a Signed-off-by: Asami Doi d0iasm.pub@gmail.com --- M src/arch/mips/ashldi3.c M src/arch/mips/boot.c M src/arch/mips/bootblock_simple.c M src/arch/mips/include/arch/memlayout.h 4 files changed, 7 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/31938/3
Asami Doi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31938 )
Change subject: src/arch/mips: Fix checkpatch warnings and errors ......................................................................
Patch Set 10:
Hello. This is my first patch for the coreboot project. I just fixed some checkpatch errors to practice how to work on the coreboot project. Could anyone review this patch? Thank you.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31938 )
Change subject: src/arch/mips: Fix checkpatch warnings and errors ......................................................................
Patch Set 10: Code-Review+2
I don't think anyone is still using or maintaining the MIPS port anymore to be honest, there's a lot of stuff in disrepair here (more than just style). But LGTM anyway.
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31938 )
Change subject: src/arch/mips: Fix checkpatch warnings and errors ......................................................................
src/arch/mips: Fix checkpatch warnings and errors
This patch will fix these checkpatch errors in src/arch/mips/. - src/arch/mips/ashldi3.c:22: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' - src/arch/mips/bootblock_simple.c:35: WARNING: braces {} are not necessary for any arm of this statement
Change-Id: Ic859913b93dc8ed6ff64b551c8a6baf72d28c75a Signed-off-by: Asami Doi d0iasm.pub@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/31938 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/arch/mips/ashldi3.c M src/arch/mips/bootblock_simple.c 2 files changed, 4 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/arch/mips/ashldi3.c b/src/arch/mips/ashldi3.c index 9ee40efa..f68d78e 100644 --- a/src/arch/mips/ashldi3.c +++ b/src/arch/mips/ashldi3.c @@ -19,7 +19,7 @@ #errror "What endian are you!?" #endif
-typedef unsigned word_type; +typedef unsigned int word_type; long long __ashldi3(long long u, word_type b);
struct DWstruct { diff --git a/src/arch/mips/bootblock_simple.c b/src/arch/mips/bootblock_simple.c index 40987d8..84029eb 100644 --- a/src/arch/mips/bootblock_simple.c +++ b/src/arch/mips/bootblock_simple.c @@ -32,10 +32,10 @@
bootblock_mmu_init();
- if (init_extra_hardware()) { + if (init_extra_hardware()) printk(BIOS_ERR, "bootblock_simple: failed to init HW.\n"); - } else { + else run_romstage(); - } + halt(); }