Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1010
-gerrit
commit cf8dbfb96c925097dad06e7d0cabcfe8896716d5 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sun May 6 12:39:26 2012 +0300
SerialICE factoring: fix indent
Run qemu -style indent.
Change-Id: I7b980c6fd7f383946ace97dcc612a0a42184dcbe Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- qemu-0.15.x/serialice-com.c | 72 +++++++++++++++++++----------------------- 1 files changed, 33 insertions(+), 39 deletions(-)
diff --git a/qemu-0.15.x/serialice-com.c b/qemu-0.15.x/serialice-com.c index 478d0d8..07ab293 100644 --- a/qemu-0.15.x/serialice-com.c +++ b/qemu-0.15.x/serialice-com.c @@ -48,80 +48,75 @@ void serialice_io_write_wrapper(uint16_t port, unsigned int size, uint32_t data) return; }
- uint32_t serialice_load_wrapper(uint32_t addr, unsigned int size) { uint32_t ret; switch (size) { case 1: - uint8_t ret; - sprintf(s->command, "*rm%08x.b", addr); - // command read back: "\n00" (3 characters) - serialice_command(s->command, 3); - ret = (uint8_t) strtoul(s->buffer + 1, (char **)NULL, 16); - return ret; + uint8_t ret; + sprintf(s->command, "*rm%08x.b", addr); + // command read back: "\n00" (3 characters) + serialice_command(s->command, 3); + ret = (uint8_t) strtoul(s->buffer + 1, (char **)NULL, 16); + return ret; case 2: - sprintf(s->command, "*rm%08x.w", addr); - // command read back: "\n0000" (5 characters) - serialice_command(s->command, 5); - ret = (uint16_t) strtoul(s->buffer + 1, (char **)NULL, 16); - return ret; + sprintf(s->command, "*rm%08x.w", addr); + // command read back: "\n0000" (5 characters) + serialice_command(s->command, 5); + ret = (uint16_t) strtoul(s->buffer + 1, (char **)NULL, 16); + return ret; case 4: - sprintf(s->command, "*rm%08x.l", addr); - // command read back: "\n00000000" (9 characters) - serialice_command(s->command, 9); - ret = (uint32_t) strtoul(s->buffer + 1, (char **)NULL, 16); - return ret; + sprintf(s->command, "*rm%08x.l", addr); + // command read back: "\n00000000" (9 characters) + serialice_command(s->command, 9); + ret = (uint32_t) strtoul(s->buffer + 1, (char **)NULL, 16); + return ret; default: printf("WARNING: unknown read access size %d @%08x\n", size, addr); } return 0; }
-void serialice_store_wrapper(uint32_t addr, unsigned int size, - uint32_t data) +void serialice_store_wrapper(uint32_t addr, unsigned int size, uint32_t data) { switch (size) { case 1: - sprintf(s->command, "*wm%08x.b=%02x", addr, data); - serialice_command(s->command, 0); + sprintf(s->command, "*wm%08x.b=%02x", addr, data); + serialice_command(s->command, 0); break; case 2: - sprintf(s->command, "*wm%08x.w=%04x", addr, data); - serialice_command(s->command, 0); + sprintf(s->command, "*wm%08x.w=%04x", addr, data); + serialice_command(s->command, 0); break; case 4: - sprintf(s->command, "*wm%08x.l=%08x", addr, data); - serialice_command(s->command, 0); + sprintf(s->command, "*wm%08x.l=%08x", addr, data); + serialice_command(s->command, 0); break; default: printf("WARNING: unknown write access size %d @%08x\n", size, addr); } }
- - void serialice_rdmsr_wrapper(uint32_t addr, uint32_t key, - uint32_t *hi, uint32_t *lo) + uint32_t * hi, uint32_t * lo) { - sprintf(s->command, "*rc%08x.%08x", addr, key); + sprintf(s->command, "*rc%08x.%08x", addr, key);
- // command read back: "\n00000000.00000000" (18 characters) - serialice_command(s->command, 18); + // command read back: "\n00000000.00000000" (18 characters) + serialice_command(s->command, 18);
- s->buffer[9] = 0; // . -> \0 - hi = (uint32_t) strtoul(s->buffer + 1, (char **)NULL, 16); - lo = (uint32_t) strtoul(s->buffer + 10, (char **)NULL, 16); + s->buffer[9] = 0; // . -> \0 + hi = (uint32_t) strtoul(s->buffer + 1, (char **)NULL, 16); + lo = (uint32_t) strtoul(s->buffer + 10, (char **)NULL, 16); }
void serialice_wrmsr_wrapper(uint32_t addr, uint32_t key, - uint32_t hi, uint32_t lo) + uint32_t hi, uint32_t lo) { - sprintf(s->command, "*wc%08x.%08x=%08x.%08x", addr, key, hi, lo); - serialice_command(s->command, 0); + sprintf(s->command, "*wc%08x.%08x=%08x.%08x", addr, key, hi, lo); + serialice_command(s->command, 0); }
- void serialice_cpuid_wrapper(uint32_t eax, uint32_t ecx, cpuid_regs_t ret) { sprintf(s->command, "*ci%08x.%08x", eax, ecx); @@ -138,4 +133,3 @@ void serialice_cpuid_wrapper(uint32_t eax, uint32_t ecx, cpuid_regs_t ret) ret.ecx = (uint32_t) strtoul(s->buffer + 19, (char **)NULL, 16); ret.edx = (uint32_t) strtoul(s->buffer + 28, (char **)NULL, 16); } -