diff options
-rw-r--r-- | src/flash/cfi.c | 2 | ||||
-rw-r--r-- | src/flash/ecos.c | 2 | ||||
-rw-r--r-- | src/flash/mflash.c | 2 | ||||
-rw-r--r-- | src/flash/ocl/at91sam7x/main.c | 2 | ||||
-rw-r--r-- | src/flash/ocl/at91sam7x/samflash.c | 2 | ||||
-rw-r--r-- | src/helper/log.c | 2 | ||||
-rw-r--r-- | src/helper/time_support.c | 6 | ||||
-rw-r--r-- | src/jtag/tcl.c | 6 | ||||
-rw-r--r-- | src/jtag/zy1000/zy1000.c | 12 | ||||
-rw-r--r-- | src/server/gdb_server.c | 2 | ||||
-rw-r--r-- | src/target/arm7_9_common.c | 2 | ||||
-rw-r--r-- | src/target/image.c | 2 | ||||
-rw-r--r-- | src/target/mips32_pracc.c | 30 | ||||
-rw-r--r-- | src/target/target.c | 6 |
14 files changed, 39 insertions, 39 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c index f6ddead3..1d4ae537 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -1014,7 +1014,7 @@ static void cfi_fix_code_endian(target_t *target, uint8_t *dest, const uint32_t for (i=0; i< count; i++) { target_buffer_set_u32(target, dest, *src); - dest+=4; + dest += 4; src++; } } diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 5d1badd6..ec3b3c13 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -319,7 +319,7 @@ static int eCosBoard_flash(ecosflash_flash_bank_t *info, void *data, uint32_t ad uint32_t i; - for (i=0; i<len; i+=chunk) + for (i=0; i<len; i += chunk) { int t=len-i; if (t>chunk) diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 8518df19..b26e62b7 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -278,7 +278,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time) duration_stop_measure(&duration, NULL); t=duration.duration.tv_usec/1000; - t+=duration.duration.tv_sec*1000; + t += duration.duration.tv_sec*1000; if (t > time) break; diff --git a/src/flash/ocl/at91sam7x/main.c b/src/flash/ocl/at91sam7x/main.c index 3d88d91a..6ecbf35a 100644 --- a/src/flash/ocl/at91sam7x/main.c +++ b/src/flash/ocl/at91sam7x/main.c @@ -64,7 +64,7 @@ void cmd_flash(uint32 cmd) result=0; pagenum=adr/flash_page_size; - for (bi=0; bi<bi_end; bi+=flash_page_size/4) { + for (bi=0; bi<bi_end; bi += flash_page_size/4) { result=flash_page_program(buffer+bi, pagenum++); if (result) break; } diff --git a/src/flash/ocl/at91sam7x/samflash.c b/src/flash/ocl/at91sam7x/samflash.c index 81c1801d..d7c21f72 100644 --- a/src/flash/ocl/at91sam7x/samflash.c +++ b/src/flash/ocl/at91sam7x/samflash.c @@ -146,7 +146,7 @@ int flash_erase_plane(int efc_ofs) if ((inr(MC_FSR+efc_ofs)&MC_LOCKE)) return FLASH_STAT_LOCKE; } - if ((page_num+=flash_lock_pages)>flash_page_count) break; + if ((page_num += flash_lock_pages)>flash_page_count) break; lockbits>>=1; } diff --git a/src/helper/log.c b/src/helper/log.c index b596075f..0e04af6f 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -429,7 +429,7 @@ void alive_sleep(int ms) { int i; int napTime=10; - for (i=0; i<ms; i+=napTime) + for (i=0; i<ms; i += napTime) { int sleep_a_bit=ms-i; if (sleep_a_bit>napTime) diff --git a/src/helper/time_support.c b/src/helper/time_support.c index 7a9a8001..922d411d 100644 --- a/src/helper/time_support.c +++ b/src/helper/time_support.c @@ -100,7 +100,7 @@ int duration_stop_measure(duration_t *duration, char **text) { float t; t=duration->duration.tv_sec; - t+=(float)duration->duration.tv_usec/1000000.0; + t += (float)duration->duration.tv_usec/1000000.0; *text = malloc(100); snprintf(*text, 100, "%fs", t); } @@ -114,8 +114,8 @@ long long timeval_ms() long long t=0; gettimeofday(&now, NULL); - t+=now.tv_usec/1000; - t+=now.tv_sec*1000; + t += now.tv_usec/1000; + t += now.tv_sec*1000; return t; } diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 2be7f87b..24870ab2 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -1274,7 +1274,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args /* validate arguments as numbers */ e = JIM_OK; - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; const char *cp; @@ -1333,7 +1333,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args num_fields=(argc-2)/2; fields = malloc(sizeof(scan_field_t) * num_fields); - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; int len; @@ -1361,7 +1361,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args field_count=0; Jim_Obj *list = Jim_NewListObj(interp, NULL, 0); - for (i = 2; i < argc; i+=2) + for (i = 2; i < argc; i += 2) { long bits; char *str; diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index d31b4336..5e4bda0f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -455,7 +455,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ value=0; if (fields[i].out_value != NULL) { - for (l=0; l<k; l+=8) + for (l=0; l<k; l += 8) { value|=fields[i].out_value[(j+l)/8]<<l; } @@ -472,12 +472,12 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ // we're shifting in data to MSB, shift data to be aligned for returning the value value >>= 32-k; - for (l=0; l<k; l+=8) + for (l=0; l<k; l += 8) { inBuffer[(j+l)/8]=(value>>l)&0xff; } } - j+=k; + j += k; } } } @@ -634,7 +634,7 @@ static int zy1000_jtag_add_clocks(int num_cycles, tap_state_t state, tap_state_t /* execute num_cycles, 32 at the time. */ int i; - for (i=0; i<num_cycles; i+=32) + for (i=0; i<num_cycles; i += 32) { int num; num=32; @@ -742,7 +742,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l { shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 1)); shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5)); - buffer+=4; + buffer += 4; } } else { @@ -751,7 +751,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l { shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 0)); shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5)); - buffer+=4; + buffer += 4; } } } diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index a13f215f..e6a1ce55 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -923,7 +923,7 @@ void gdb_target_to_reg(target_t *target, char *tstr, int str_len, uint8_t *bin) } int i; - for (i = 0; i < str_len; i+=2) + for (i = 0; i < str_len; i += 2) { uint8_t t = hextoint(tstr[i])<<4; t |= hextoint(tstr[i+1]); diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 50b6d6a8..474f9467 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2587,7 +2587,7 @@ static int arm7_9_dcc_completion(struct target_s *target, uint32_t exit_point, i /* Handle first & last using standard embeddedice_write_reg and the middle ones w/the * core function repeated. */ embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_COMMS_DATA], fast_target_buffer_get_u32(buffer, little)); - buffer+=4; + buffer += 4; embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info; uint8_t reg_addr = ice_reg->addr & 0x1f; diff --git a/src/target/image.c b/src/target/image.c index 66bcc95f..45107b48 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -764,7 +764,7 @@ int image_open(image_t *image, char *url, char *type_string) int section; for (section=0; section < image->num_sections; section++) { - image->sections[section].base_address+=image->base_address; + image->sections[section].base_address += image->base_address; } /* we're done relocating. The two statements below are mainly * for documenation purposes: stop anyone from empirically diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 4e032f65..06e852ba 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -314,8 +314,8 @@ int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,4), /* $1+=4 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,4), /* $1 += 4 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ @@ -422,8 +422,8 @@ int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,2), /* $9+=2 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,2), /* $9 += 2 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ MIPS32_NOP, @@ -501,8 +501,8 @@ int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, u MIPS32_SW(8,0,11), /* sw $8,0($11) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,1), /* $9+=1 */ - MIPS32_ADDI(11,11,4), /* $11+=4 */ + MIPS32_ADDI(9,9,1), /* $9 += 1 */ + MIPS32_ADDI(11,11,4), /* $11 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ MIPS32_NOP, @@ -588,15 +588,15 @@ int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ADDI(8,15,NEG16(MIPS32_PRACC_STACK-MIPS32_PRACC_PARAM_IN)), //$8= MIPS32_PRACC_PARAM_IN MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), //last address /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), // $8+=8 beginning of data + MIPS32_ADDI(8,8,8), // $8 += 8 beginning of data //loop: MIPS32_LW(11,0,8), /* lw $11,0($8), Load $11 with the word @mem[$8] */ MIPS32_SW(11,0,9), /* sw $11,0($9) */ - MIPS32_ADDI(9,9,4), /* $9+=4 */ + MIPS32_ADDI(9,9,4), /* $9 += 4 */ MIPS32_BNE(10,9,NEG16(4)), //was 9 BNE $10, 9, loop /* b loop */ - MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8+=4 */ + MIPS32_ADDI(8,8,4), //this instruction is part of the loop (one delay slot)! /* $8 += 4 */ /* end: */ MIPS32_LW(11,0,15), /* lw $11,($15) */ MIPS32_LW(10,0,15), /* lw $10,($15) */ @@ -669,7 +669,7 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)), MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), /* $8+=8 */ + MIPS32_ADDI(8,8,8), /* $8 += 8 */ MIPS32_NOP, /* loop: */ MIPS32_BEQ(0,10,9), /* beq $0, $10, end */ @@ -679,8 +679,8 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SH(11,0,9), /* sh $11,0($9) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,2), /* $9+=2 */ - MIPS32_ADDI(8,8,4), /* $8+=4 */ + MIPS32_ADDI(9,9,2), /* $9 += 2 */ + MIPS32_ADDI(8,8,4), /* $8 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ @@ -729,7 +729,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)), MIPS32_LW(9,0,8), /* Load write addr to $9 */ MIPS32_LW(10,4,8), /* Load write count to $10 */ - MIPS32_ADDI(8,8,8), /* $8+=8 */ + MIPS32_ADDI(8,8,8), /* $8 += 8 */ MIPS32_NOP, /* loop: */ MIPS32_BEQ(0,10,9), /* beq $0, $10, end */ @@ -739,8 +739,8 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, MIPS32_SB(11,0,9), /* sb $11,0($9) */ MIPS32_ADDI(10,10,NEG16(1)), /* $10-- */ - MIPS32_ADDI(9,9,1), /* $9+=1 */ - MIPS32_ADDI(8,8,4), /* $8+=4 */ + MIPS32_ADDI(9,9,1), /* $9 += 1 */ + MIPS32_ADDI(8,8,4), /* $8 += 4 */ MIPS32_NOP, MIPS32_B(NEG16(9)), /* b loop */ diff --git a/src/target/target.c b/src/target/target.c index 5ff22324..56bcdf05 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2285,7 +2285,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm if (image.sections[i].base_address<min_address) { /* clip addresses below */ - offset+=min_address-image.sections[i].base_address; + offset += min_address-image.sections[i].base_address; length -= offset; } @@ -4466,7 +4466,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha if (image.sections[i].base_address<min_address) { /* clip addresses below */ - offset+=min_address-image.sections[i].base_address; + offset += min_address-image.sections[i].base_address; length -= offset; } @@ -4535,7 +4535,7 @@ static int handle_fast_load_command(struct command_context_s *cmd_ctx, char *cmd { retval = target_write_buffer(target, fastload[i].address, fastload[i].length, fastload[i].data); } - size+=fastload[i].length; + size += fastload[i].length; } int after=timeval_ms(); command_print(cmd_ctx, "Loaded image %f kBytes/s", (float)(size/1024.0)/((float)(after-ms)/1000.0)); |