Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/37494 )
Change subject: trace.c: cosmetic coding style fixes ......................................................................
trace.c: cosmetic coding style fixes
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ic8bd4c32c8f939aab9e1c22fc45f369e696f9380 --- M trace.c 1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/94/37494/1
diff --git a/trace.c b/trace.c index 31b6e06..5e98acb 100644 --- a/trace.c +++ b/trace.c @@ -50,7 +50,7 @@ #define REPORT_BUFFER_LENGTH 8192 #define REPORT_BUFFER_COUNT 8
-static int read_report_buffer(struct em100 *em100, +static int read_report_buffer(struct em100 *em100, unsigned char reportdata[REPORT_BUFFER_COUNT][REPORT_BUFFER_LENGTH]) { unsigned char cmd[16] = {0}; @@ -59,7 +59,7 @@
cmd[0] = 0xbc; /* read SPI trace buffer*/
- /* + /* * Trace length, unit is 4k according to specs * * cmd1..cmd4 are probably u32BE on how many @@ -128,7 +128,8 @@ {"unknown command", 0xff, 0, 0} };
-static struct spi_cmd_values * get_command_vals(uint8_t command) { +static struct spi_cmd_values * get_command_vals(uint8_t command) +{ /* cache last command so a search isn't needed every time */ static struct spi_cmd_values *spi_cmd = &spi_command_list[3]; /* init to read */ int i; @@ -265,7 +266,8 @@ * Multiple messages can be in a single uFIFO transfer, so loop through * the data looking for the signature. */ -int read_spi_terminal(struct em100 *em100, int show_counter) { +int read_spi_terminal(struct em100 *em100, int show_counter) +{ unsigned char data[UFIFO_SIZE] = { 0 }; static unsigned int msg_counter = 1; /* Number of messages */ uint16_t data_length;
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/37494 )
Change subject: trace.c: cosmetic coding style fixes ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/37494 )
Change subject: trace.c: cosmetic coding style fixes ......................................................................
Patch Set 1: Code-Review+2
My OCD approves this change
Stefan Reinauer has submitted this change. ( https://review.coreboot.org/c/em100/+/37494 )
Change subject: trace.c: cosmetic coding style fixes ......................................................................
trace.c: cosmetic coding style fixes
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ic8bd4c32c8f939aab9e1c22fc45f369e696f9380 Reviewed-on: https://review.coreboot.org/c/em100/+/37494 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com --- M trace.c 1 file changed, 6 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/trace.c b/trace.c index 31b6e06..5e98acb 100644 --- a/trace.c +++ b/trace.c @@ -50,7 +50,7 @@ #define REPORT_BUFFER_LENGTH 8192 #define REPORT_BUFFER_COUNT 8
-static int read_report_buffer(struct em100 *em100, +static int read_report_buffer(struct em100 *em100, unsigned char reportdata[REPORT_BUFFER_COUNT][REPORT_BUFFER_LENGTH]) { unsigned char cmd[16] = {0}; @@ -59,7 +59,7 @@
cmd[0] = 0xbc; /* read SPI trace buffer*/
- /* + /* * Trace length, unit is 4k according to specs * * cmd1..cmd4 are probably u32BE on how many @@ -128,7 +128,8 @@ {"unknown command", 0xff, 0, 0} };
-static struct spi_cmd_values * get_command_vals(uint8_t command) { +static struct spi_cmd_values * get_command_vals(uint8_t command) +{ /* cache last command so a search isn't needed every time */ static struct spi_cmd_values *spi_cmd = &spi_command_list[3]; /* init to read */ int i; @@ -265,7 +266,8 @@ * Multiple messages can be in a single uFIFO transfer, so loop through * the data looking for the signature. */ -int read_spi_terminal(struct em100 *em100, int show_counter) { +int read_spi_terminal(struct em100 *em100, int show_counter) +{ unsigned char data[UFIFO_SIZE] = { 0 }; static unsigned int msg_counter = 1; /* Number of messages */ uint16_t data_length;