diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:46:23 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:46:23 +0000 |
commit | f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1 (patch) | |
tree | 66070c6e1e7a5a72c1d1af437e0e2c49a410fa7b /src | |
parent | 6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa (diff) |
Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
69 files changed, 1002 insertions, 1002 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c index 62f7319d..91780a98 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -93,7 +93,7 @@ struct tftpd_fileops fileops = (int (*)(const char *, int))open, close, (int (*)(int, const void *, int))write, - ( int (*)(int, void *, int))read + (int (*)(int, void *, int))read }; #endif @@ -253,7 +253,7 @@ void copyfile(char *name2, char *name1); void copydir(char *name, char *destdir); #if 0 -MTAB_ENTRY( romfs_mte1, +MTAB_ENTRY(romfs_mte1, "/rom", "romfs", "", @@ -1130,7 +1130,7 @@ static int tftpfs_fo_lseek(struct CYG_FILE_TAG *fp, off_t *apos, int whence); // For simplicity we use _FILESYSTEM synchronization for all accesses since // we should never block in any filesystem operations. #if 1 -FSTAB_ENTRY( tftpfs_fste, "tftpfs", 0, +FSTAB_ENTRY(tftpfs_fste, "tftpfs", 0, CYG_SYNCMODE_NONE, tftpfs_mount, tftpfs_umount, @@ -1151,7 +1151,7 @@ FSTAB_ENTRY( tftpfs_fste, "tftpfs", 0, // mtab entry. // This defines a single ROMFS loaded into ROM at the configured address // -// MTAB_ENTRY( rom_mte, // structure name +// MTAB_ENTRY(rom_mte, // structure name // "/rom", // mount point // "romfs", // FIlesystem type // "", // hardware device @@ -1459,7 +1459,7 @@ static int logfs_fo_close(struct CYG_FILE_TAG *fp); // This defines the entry in the filesystem table. // For simplicity we use _FILESYSTEM synchronization for all accesses since // we should never block in any filesystem operations. -FSTAB_ENTRY( logfs_fste, "logfs", 0, +FSTAB_ENTRY(logfs_fste, "logfs", 0, CYG_SYNCMODE_FILE_FILESYSTEM | CYG_SYNCMODE_IO_FILESYSTEM, logfs_mount, logfs_umount, diff --git a/src/flash/at91sam7.c b/src/flash/at91sam7.c index bb2a28f5..6ac795b0 100644 --- a/src/flash/at91sam7.c +++ b/src/flash/at91sam7.c @@ -187,7 +187,7 @@ static void at91sam7_read_clock_info(flash_bank_t *bank) } /* Prescaler adjust */ - if ( (((mckr & PMC_MCKR_PRES) >> 2) == 7) || (tmp == 0) ) + if ((((mckr & PMC_MCKR_PRES) >> 2) == 7) || (tmp == 0) ) { at91sam7_info->mck_valid = 0; at91sam7_info->mck_freq = 0; @@ -707,7 +707,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank) at91sam7_info->num_lockbits_on = 0; for (lock_pos = 0; lock_pos < bank->num_sectors; lock_pos++) { - if ( ((status >> (16 + lock_pos))&(0x0001)) == 1) + if (((status >> (16 + lock_pos))&(0x0001)) == 1) { at91sam7_info->num_lockbits_on++; bank->sectors[lock_pos].is_protected = 1; @@ -725,7 +725,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank) at91sam7_info->num_nvmbits_on = 0; for (gpnvm_pos = 0; gpnvm_pos < at91sam7_info->num_nvmbits; gpnvm_pos++) { - if ( ((status >> (8 + gpnvm_pos))&(0x01)) == 1) + if (((status >> (8 + gpnvm_pos))&(0x01)) == 1) { at91sam7_info->num_nvmbits_on++; } @@ -907,7 +907,7 @@ static int at91sam7_erase(struct flash_bank_s *bank, int first, int last) buffer[pos] = 0xFF; } - if ( at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK) + if (at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK) { return ERROR_FLASH_OPERATION_FAILED; } diff --git a/src/flash/avrf.c b/src/flash/avrf.c index dd964e6b..2f7901ba 100644 --- a/src/flash/avrf.c +++ b/src/flash/avrf.c @@ -323,7 +323,7 @@ static int avrf_probe(struct flash_bank_s *bank) return ERROR_FAIL; } - LOG_INFO( "device id = 0x%08" PRIx32 "", device_id ); + LOG_INFO("device id = 0x%08" PRIx32 "", device_id ); if (EXTRACT_MFG(device_id) != 0x1F) { LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F); @@ -402,7 +402,7 @@ static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size) return ERROR_FAIL; } - LOG_INFO( "device id = 0x%08" PRIx32 "", device_id ); + LOG_INFO("device id = 0x%08" PRIx32 "", device_id ); if (EXTRACT_MFG(device_id) != 0x1F) { LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F); diff --git a/src/flash/cfi.c b/src/flash/cfi.c index 7972bdbd..21489952 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -1154,7 +1154,7 @@ static int cfi_intel_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin /* flash write code */ if (!cfi_info->write_algorithm) { - if ( target_code_size > sizeof(target_code) ) + if (target_code_size > sizeof(target_code) ) { LOG_WARNING("Internal error - target code buffer to small. Increase CFI_MAX_INTEL_CODESIZE and recompile."); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; diff --git a/src/flash/flash.c b/src/flash/flash.c index 5ca26622..3bf760e3 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -793,7 +793,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm for (wrote = 0; wrote < (count*wordsize); wrote += cur_size) { - cur_size = MIN( (count*wordsize - wrote), sizeof(chunk) ); + cur_size = MIN((count*wordsize - wrote), sizeof(chunk) ); flash_bank_t *bank; bank = get_flash_bank_by_addr(target, address); if (bank == NULL) @@ -994,7 +994,7 @@ int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length) } } - if ( first == -1 || last == -1 ) + if (first == -1 || last == -1 ) return ERROR_OK; return flash_driver_erase(c, first, last); @@ -1127,7 +1127,7 @@ int flash_write(target_t *target, image_t *image, uint32_t *written, int erase) if (erase) { /* calculate and erase sectors */ - retval = flash_erase_address_range( target, run_address, run_size ); + retval = flash_erase_address_range(target, run_address, run_size ); } if (retval == ERROR_OK) diff --git a/src/flash/non_cfi.c b/src/flash/non_cfi.c index f3fd20f9..86248ec8 100644 --- a/src/flash/non_cfi.c +++ b/src/flash/non_cfi.c @@ -114,10 +114,10 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), - ERASE_REGION( 7, 64*KB) + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), + ERASE_REGION(7, 64*KB) } }, { @@ -131,10 +131,10 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 7, 64*KB), - ERASE_REGION( 1, 32*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 16*KB) + ERASE_REGION(7, 64*KB), + ERASE_REGION(1, 32*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 16*KB) } }, @@ -236,10 +236,10 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), - ERASE_REGION( 7, 64*KB) + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), + ERASE_REGION(7, 64*KB) } }, { @@ -253,10 +253,10 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 7, 64*KB), - ERASE_REGION( 1, 32*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 16*KB) + ERASE_REGION(7, 64*KB), + ERASE_REGION(1, 32*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 16*KB) } }, { @@ -270,9 +270,9 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), ERASE_REGION(15, 64*KB) } }, @@ -287,9 +287,9 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), ERASE_REGION(15, 64*KB) } }, @@ -304,9 +304,9 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), ERASE_REGION(15, 64*KB) } }, @@ -322,9 +322,9 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), ERASE_REGION(31, 64*KB) } }, @@ -340,9 +340,9 @@ non_cfi_t non_cfi_flashes[] = { .erase_region_info = { ERASE_REGION(31, 64*KB), - ERASE_REGION( 1, 32*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 16*KB) + ERASE_REGION(1, 32*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 16*KB) } }, { @@ -356,8 +356,8 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 3, .erase_region_info = { - ERASE_REGION( 8, 8*KB), - ERASE_REGION( 2, 32*KB), + ERASE_REGION(8, 8*KB), + ERASE_REGION(2, 32*KB), ERASE_REGION(30, 64*KB) } }, @@ -373,8 +373,8 @@ non_cfi_t non_cfi_flashes[] = { .erase_region_info = { ERASE_REGION(30, 64*KB), - ERASE_REGION( 2, 32*KB), - ERASE_REGION( 8, 8*KB) + ERASE_REGION(2, 32*KB), + ERASE_REGION(8, 8*KB) } }, { @@ -388,9 +388,9 @@ non_cfi_t non_cfi_flashes[] = { .num_erase_regions = 4, .erase_region_info = { - ERASE_REGION( 1, 16*KB), - ERASE_REGION( 2, 8*KB), - ERASE_REGION( 1, 32*KB), + ERASE_REGION(1, 16*KB), + ERASE_REGION(2, 8*KB), + ERASE_REGION(1, 32*KB), ERASE_REGION(15, 64*KB) } }, diff --git a/src/flash/ocl/at91sam7x/samflash.c b/src/flash/ocl/at91sam7x/samflash.c index bcb6dd09..1dcc9f9d 100644 --- a/src/flash/ocl/at91sam7x/samflash.c +++ b/src/flash/ocl/at91sam7x/samflash.c @@ -189,7 +189,7 @@ int flash_verify(uint32 adr, unsigned int len, uint8 *src) unsigned char *flash_ptr; flash_ptr = (uint8 *)FLASH_AREA_ADDR + adr; - for ( ;len; len--) { + for (;len; len--) { if (*(flash_ptr++)!=*(src++)) return FLASH_STAT_VERIFE; } return FLASH_STAT_OK; diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c index dab58a4b..29077c6d 100644 --- a/src/flash/pic32mx.c +++ b/src/flash/pic32mx.c @@ -229,9 +229,9 @@ static int pic32mx_erase(struct flash_bank_s *bank, int first, int last) { LOG_DEBUG("Erasing entire program flash"); status = pic32mx_nvm_exec(bank, NVMCON_OP_PFM_ERASE, 50); - if ( status & NVMCON_NVMERR ) + if (status & NVMCON_NVMERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & NVMCON_LVDERR ) + if (status & NVMCON_LVDERR ) return ERROR_FLASH_OPERATION_FAILED; return ERROR_OK; } @@ -245,9 +245,9 @@ static int pic32mx_erase(struct flash_bank_s *bank, int first, int last) status = pic32mx_nvm_exec(bank, NVMCON_OP_PAGE_ERASE, 10); - if ( status & NVMCON_NVMERR ) + if (status & NVMCON_NVMERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & NVMCON_LVDERR ) + if (status & NVMCON_LVDERR ) return ERROR_FLASH_OPERATION_FAILED; bank->sectors[i].is_erased = 1; } @@ -313,7 +313,7 @@ static int pic32mx_protect(struct flash_bank_s *bank, int set, int first, int la reg = (i / pic32mx_info->ppage_size) / 8; bit = (i / pic32mx_info->ppage_size) - (reg * 8); - if ( set ) + if (set ) prot_reg[reg] &= ~(1 << bit); else prot_reg[reg] |= (1 << bit); @@ -327,7 +327,7 @@ static int pic32mx_protect(struct flash_bank_s *bank, int set, int first, int la reg = (i / pic32mx_info->ppage_size) / 8; bit = (i / pic32mx_info->ppage_size) - (reg * 8); - if ( set ) + if (set ) prot_reg[reg] &= ~(1 << bit); else prot_reg[reg] |= (1 << bit); @@ -434,12 +434,12 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3 } #endif status = pic32mx_write_row(bank, address, source->address); - if ( status & NVMCON_NVMERR ) { + if (status & NVMCON_NVMERR ) { LOG_ERROR("Flash write error NVMERR (status = 0x%08" PRIx32 ")", status); retval = ERROR_FLASH_OPERATION_FAILED; break; } - if ( status & NVMCON_LVDERR ) { + if (status & NVMCON_LVDERR ) { LOG_ERROR("Flash write error LVDERR (status = 0x%08" PRIx32 ")", status); retval = ERROR_FLASH_OPERATION_FAILED; break; @@ -458,12 +458,12 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3 memcpy(&value, buffer, sizeof(uint32_t)); uint32_t status = pic32mx_write_word(bank, address, value); - if ( status & NVMCON_NVMERR ) { + if (status & NVMCON_NVMERR ) { LOG_ERROR("Flash write error NVMERR (status = 0x%08" PRIx32 ")", status); retval = ERROR_FLASH_OPERATION_FAILED; break; } - if ( status & NVMCON_LVDERR ) { + if (status & NVMCON_LVDERR ) { LOG_ERROR("Flash write error LVDERR (status = 0x%08" PRIx32 ")", status); retval = ERROR_FLASH_OPERATION_FAILED; break; @@ -564,9 +564,9 @@ static int pic32mx_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of memcpy(&value, buffer + bytes_written, sizeof(uint32_t)); status = pic32mx_write_word(bank, address, value); - if ( status & NVMCON_NVMERR ) + if (status & NVMCON_NVMERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & NVMCON_LVDERR ) + if (status & NVMCON_LVDERR ) return ERROR_FLASH_OPERATION_FAILED; bytes_written += 4; @@ -580,9 +580,9 @@ static int pic32mx_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of memcpy(&value, buffer + bytes_written, bytes_remaining); status = pic32mx_write_word(bank, address, value); - if ( status & NVMCON_NVMERR ) + if (status & NVMCON_NVMERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & NVMCON_LVDERR ) + if (status & NVMCON_LVDERR ) return ERROR_FLASH_OPERATION_FAILED; } @@ -603,14 +603,14 @@ static int pic32mx_probe(struct flash_bank_s *bank) pic32mx_info->probed = 0; device_id = ejtag_info->idcode; - LOG_INFO( "device id = 0x%08" PRIx32 " (manuf 0x%03x dev 0x%02x, ver 0x%03x)", + LOG_INFO("device id = 0x%08" PRIx32 " (manuf 0x%03x dev 0x%02x, ver 0x%03x)", device_id, (unsigned)((device_id >> 1)&0x7ff), (unsigned)((device_id >> 12)&0xff), (unsigned)((device_id >> 20)&0xfff) ); if (((device_id >> 1)&0x7ff) != PIC32MX_MANUF_ID) { - LOG_WARNING( "Cannot identify target as a PIC32MX family." ); + LOG_WARNING("Cannot identify target as a PIC32MX family." ); return ERROR_FLASH_OPERATION_FAILED; } @@ -626,7 +626,7 @@ static int pic32mx_probe(struct flash_bank_s *bank) break; } if (pic32mx_devs[i].name == NULL) { - LOG_WARNING( "Cannot identify target as a PIC32MX family." ); + LOG_WARNING("Cannot identify target as a PIC32MX family." ); return ERROR_FLASH_OPERATION_FAILED; } } @@ -646,7 +646,7 @@ static int pic32mx_probe(struct flash_bank_s *bank) } #endif - LOG_INFO( "flash size = %dkbytes", num_pages ); + LOG_INFO("flash size = %dkbytes", num_pages ); /* calculate numbers of pages */ num_pages /= (page_size / 1024); @@ -847,13 +847,13 @@ static int pic32mx_chip_erase(struct flash_bank_s *bank) target_write_u32(target, PIC32MX_FLASH_CR, FLASH_LOCK); - if ( status & FLASH_WRPRTERR ) + if (status & FLASH_WRPRTERR ) { LOG_ERROR("pic32mx device protected"); return ERROR_OK; } - if ( status & FLASH_PGERR ) + if (status & FLASH_PGERR ) { LOG_ERROR("pic32mx device programming failed"); return ERROR_OK; @@ -931,9 +931,9 @@ static int pic32mx_handle_pgm_word_command(struct command_context_s *cmd_ctx, ch res = ERROR_OK; status = pic32mx_write_word(bank, address, value); - if ( status & NVMCON_NVMERR ) + if (status & NVMCON_NVMERR ) res = ERROR_FLASH_OPERATION_FAILED; - if ( status & NVMCON_LVDERR ) + if (status & NVMCON_LVDERR ) res = ERROR_FLASH_OPERATION_FAILED; if (res == ERROR_OK) diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index aab8b9a9..2f8ca3be 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -182,9 +182,9 @@ static int stm32x_erase_options(struct flash_bank_s *bank) status = stm32x_wait_status_busy(bank, 10); - if ( status & FLASH_WRPRTERR ) + if (status & FLASH_WRPRTERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & FLASH_PGERR ) + if (status & FLASH_PGERR ) return ERROR_FLASH_OPERATION_FAILED; /* clear readout protection and complementary option bytes @@ -218,9 +218,9 @@ static int stm32x_write_options(struct flash_bank_s *bank) status = stm32x_wait_status_busy(bank, 10); - if ( status & FLASH_WRPRTERR ) + if (status & FLASH_WRPRTERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & FLASH_PGERR ) + if (status & FLASH_PGERR ) return ERROR_FLASH_OPERATION_FAILED; /* write protection byte 1 */ @@ -228,9 +228,9 @@ static int stm32x_write_options(struct flash_bank_s *bank) status = stm32x_wait_status_busy(bank, 10); - if ( status & FLASH_WRPRTERR ) + if (status & FLASH_WRPRTERR ) return ERROR_FLASH_OPERATION_FAILED; - if ( status & FLASH_PGERR ) + if (status & FLASH_PGERR ) return ERROR_FLASH_OPERATION_FAILED; /* write protection byte 2 */ @@ -238,9 +238,9 @@ static int stm32x_write_options(struct flash_bank_s *bank) status = stm32x_wait_status_busy(bank, 10); - if ( status & FLASH_WRPRTERR ) + if (status &a |