coding style: fix space around pointer's asterisk
The script checkpatch available in new Linux kernel offers an experimental feature for automatically fix the code in place. While still experimental, the feature works quite well for simple fixes, like spacing. This patch has been created automatically with the script under review for inclusion in OpenOCD, using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types POINTER_LOCATION --fix-inplace -f {} \; then manually reviewed. OpenOCD coding style does not mention the space around pointer's asterisk, so no check is enforced. This patch only makes the style uniform across the files. The patch only changes amount and position of whitespace, thus the following commands show empty diff git diff -w git log -w -p git log -w --stat Change-Id: Iefb4998e69bebdfe0d1ae65cadfc8d2c4f166d13 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5197 Tested-by: jenkins
This commit is contained in:
parent
86d8c05eb6
commit
e7306d361b
|
@ -154,7 +154,7 @@ static int dsp5680xx_flash_protect(struct flash_bank *bank, int set, int first,
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
static int dsp5680xx_flash_write(struct flash_bank *bank, const uint8_t* buffer,
|
||||
static int dsp5680xx_flash_write(struct flash_bank *bank, const uint8_t *buffer,
|
||||
uint32_t offset, uint32_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
|
@ -1216,7 +1216,7 @@ static int numicro_init_isp(struct target *target)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static uint32_t numicro_fmc_cmd(struct target *target, uint32_t cmd, uint32_t addr, uint32_t wdata, uint32_t* rdata)
|
||||
static uint32_t numicro_fmc_cmd(struct target *target, uint32_t cmd, uint32_t addr, uint32_t wdata, uint32_t *rdata)
|
||||
{
|
||||
uint32_t timeout, status;
|
||||
int retval = ERROR_OK;
|
||||
|
@ -1649,7 +1649,7 @@ static int numicro_write(struct flash_bank *bank, const uint8_t *buffer,
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int numicro_get_cpu_type(struct target *target, const struct numicro_cpu_type** cpu)
|
||||
static int numicro_get_cpu_type(struct target *target, const struct numicro_cpu_type **cpu)
|
||||
{
|
||||
uint32_t part_id;
|
||||
int retval = ERROR_OK;
|
||||
|
|
|
@ -471,7 +471,7 @@ static int sim3x_write_block(struct flash_bank *bank, const uint8_t *buf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int sim3x_flash_write(struct flash_bank *bank, const uint8_t * buffer, uint32_t offset, uint32_t count)
|
||||
static int sim3x_flash_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
|
||||
{
|
||||
int ret;
|
||||
struct target *target;
|
||||
|
|
|
@ -126,17 +126,17 @@ static inline uint64_t le_to_h_u64(const uint8_t *buf)
|
|||
(uint64_t)buf[7] << 56);
|
||||
}
|
||||
|
||||
static inline uint32_t le_to_h_u32(const uint8_t* buf)
|
||||
static inline uint32_t le_to_h_u32(const uint8_t *buf)
|
||||
{
|
||||
return (uint32_t)((uint32_t)buf[0] | (uint32_t)buf[1] << 8 | (uint32_t)buf[2] << 16 | (uint32_t)buf[3] << 24);
|
||||
}
|
||||
|
||||
static inline uint32_t le_to_h_u24(const uint8_t* buf)
|
||||
static inline uint32_t le_to_h_u24(const uint8_t *buf)
|
||||
{
|
||||
return (uint32_t)((uint32_t)buf[0] | (uint32_t)buf[1] << 8 | (uint32_t)buf[2] << 16);
|
||||
}
|
||||
|
||||
static inline uint16_t le_to_h_u16(const uint8_t* buf)
|
||||
static inline uint16_t le_to_h_u16(const uint8_t *buf)
|
||||
{
|
||||
return (uint16_t)((uint16_t)buf[0] | (uint16_t)buf[1] << 8);
|
||||
}
|
||||
|
@ -153,17 +153,17 @@ static inline uint64_t be_to_h_u64(const uint8_t *buf)
|
|||
(uint64_t)buf[0] << 56);
|
||||
}
|
||||
|
||||
static inline uint32_t be_to_h_u32(const uint8_t* buf)
|
||||
static inline uint32_t be_to_h_u32(const uint8_t *buf)
|
||||
{
|
||||
return (uint32_t)((uint32_t)buf[3] | (uint32_t)buf[2] << 8 | (uint32_t)buf[1] << 16 | (uint32_t)buf[0] << 24);
|
||||
}
|
||||
|
||||
static inline uint32_t be_to_h_u24(const uint8_t* buf)
|
||||
static inline uint32_t be_to_h_u24(const uint8_t *buf)
|
||||
{
|
||||
return (uint32_t)((uint32_t)buf[2] | (uint32_t)buf[1] << 8 | (uint32_t)buf[0] << 16);
|
||||
}
|
||||
|
||||
static inline uint16_t be_to_h_u16(const uint8_t* buf)
|
||||
static inline uint16_t be_to_h_u16(const uint8_t *buf)
|
||||
{
|
||||
return (uint16_t)((uint16_t)buf[1] | (uint16_t)buf[0] << 8);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ static inline void h_u64_to_be(uint8_t *buf, int64_t val)
|
|||
buf[7] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u32_to_le(uint8_t* buf, int val)
|
||||
static inline void h_u32_to_le(uint8_t *buf, int val)
|
||||
{
|
||||
buf[3] = (uint8_t) (val >> 24);
|
||||
buf[2] = (uint8_t) (val >> 16);
|
||||
|
@ -200,7 +200,7 @@ static inline void h_u32_to_le(uint8_t* buf, int val)
|
|||
buf[0] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u32_to_be(uint8_t* buf, int val)
|
||||
static inline void h_u32_to_be(uint8_t *buf, int val)
|
||||
{
|
||||
buf[0] = (uint8_t) (val >> 24);
|
||||
buf[1] = (uint8_t) (val >> 16);
|
||||
|
@ -208,27 +208,27 @@ static inline void h_u32_to_be(uint8_t* buf, int val)
|
|||
buf[3] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u24_to_le(uint8_t* buf, int val)
|
||||
static inline void h_u24_to_le(uint8_t *buf, int val)
|
||||
{
|
||||
buf[2] = (uint8_t) (val >> 16);
|
||||
buf[1] = (uint8_t) (val >> 8);
|
||||
buf[0] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u24_to_be(uint8_t* buf, int val)
|
||||
static inline void h_u24_to_be(uint8_t *buf, int val)
|
||||
{
|
||||
buf[0] = (uint8_t) (val >> 16);
|
||||
buf[1] = (uint8_t) (val >> 8);
|
||||
buf[2] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u16_to_le(uint8_t* buf, int val)
|
||||
static inline void h_u16_to_le(uint8_t *buf, int val)
|
||||
{
|
||||
buf[1] = (uint8_t) (val >> 8);
|
||||
buf[0] = (uint8_t) (val >> 0);
|
||||
}
|
||||
|
||||
static inline void h_u16_to_be(uint8_t* buf, int val)
|
||||
static inline void h_u16_to_be(uint8_t *buf, int val)
|
||||
{
|
||||
buf[0] = (uint8_t) (val >> 8);
|
||||
buf[1] = (uint8_t) (val >> 0);
|
||||
|
|
|
@ -213,7 +213,7 @@ static int ftdi_set_signal(const struct signal *s, char value)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int ftdi_get_signal(const struct signal *s, uint16_t * value_out)
|
||||
static int ftdi_get_signal(const struct signal *s, uint16_t *value_out)
|
||||
{
|
||||
uint8_t data_low = 0;
|
||||
uint8_t data_high = 0;
|
||||
|
|
|
@ -297,7 +297,7 @@ static int osbdm_swap(struct osbdm *osbdm, void *tms, void *tdi,
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static int osbdm_flush(struct osbdm *osbdm, struct queue* queue)
|
||||
static int osbdm_flush(struct osbdm *osbdm, struct queue *queue)
|
||||
{
|
||||
uint8_t tms[DIV_ROUND_UP(OSBDM_SWAP_MAX, 8)];
|
||||
uint8_t tdi[DIV_ROUND_UP(OSBDM_SWAP_MAX, 8)];
|
||||
|
|
|
@ -162,8 +162,8 @@ void jtag_tap_free(struct jtag_tap *tap);
|
|||
|
||||
struct jtag_tap *jtag_all_taps(void);
|
||||
const char *jtag_tap_name(const struct jtag_tap *tap);
|
||||
struct jtag_tap *jtag_tap_by_string(const char* dotted_name);
|
||||
struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj *obj);
|
||||
struct jtag_tap *jtag_tap_by_string(const char *dotted_name);
|
||||
struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *obj);
|
||||
struct jtag_tap *jtag_tap_by_position(unsigned abs_position);
|
||||
struct jtag_tap *jtag_tap_next_enabled(struct jtag_tap *p);
|
||||
unsigned jtag_tap_count_enabled(void);
|
||||
|
|
|
@ -135,7 +135,7 @@ static int embKernel_create(struct target *target)
|
|||
}
|
||||
|
||||
static int embKernel_get_tasks_details(struct rtos *rtos, int64_t iterable, const struct embKernel_params *param,
|
||||
struct thread_detail *details, const char* state_str)
|
||||
struct thread_detail *details, const char *state_str)
|
||||
{
|
||||
int64_t task = 0;
|
||||
int retval = target_read_buffer(rtos->target, iterable + param->iterable_task_owner_offset, param->pointer_width,
|
||||
|
|
|
@ -106,7 +106,7 @@ static int mqx_valid_address_check(
|
|||
)
|
||||
{
|
||||
enum mqx_arch arch_type = ((struct mqx_params *)rtos->rtos_specific_params)->target_arch;
|
||||
const char * targetname = ((struct mqx_params *)rtos->rtos_specific_params)->target_name;
|
||||
const char *targetname = ((struct mqx_params *)rtos->rtos_specific_params)->target_name;
|
||||
|
||||
/* Cortex-M address range */
|
||||
if (arch_type == mqx_arch_cortexm) {
|
||||
|
|
|
@ -2031,7 +2031,7 @@ static int lookup_add_arch_defined_types(char const **arch_defined_types_list[],
|
|||
|
||||
static int gdb_generate_reg_type_description(struct target *target,
|
||||
char **tdesc, int *pos, int *size, struct reg_data_type *type,
|
||||
char const **arch_defined_types_list[], int * num_arch_defined_types)
|
||||
char const **arch_defined_types_list[], int *num_arch_defined_types)
|
||||
{
|
||||
int retval = ERROR_OK;
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ static int avr_deassert_reset(struct target *target)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int avr_jtag_senddat(struct jtag_tap *tap, uint32_t* dr_in, uint32_t dr_out,
|
||||
int avr_jtag_senddat(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out,
|
||||
int len)
|
||||
{
|
||||
return mcu_write_dr_u32(tap, dr_in, dr_out, len, 1);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#define JTAG_INSTR_BYPASS 0x0F
|
||||
|
||||
/** */
|
||||
static inline int dsp563xx_write_dr(struct jtag_tap *tap, uint8_t * dr_in, uint8_t * dr_out, int dr_len, int rti)
|
||||
static inline int dsp563xx_write_dr(struct jtag_tap *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti)
|
||||
{
|
||||
jtag_add_plain_dr_scan(dr_len, dr_out, dr_in, TAP_IDLE);
|
||||
|
||||
|
@ -54,13 +54,13 @@ static inline int dsp563xx_write_dr(struct jtag_tap *tap, uint8_t * dr_in, uint8
|
|||
}
|
||||
|
||||
/** */
|
||||
static inline int dsp563xx_write_dr_u8(struct jtag_tap *tap, uint8_t * dr_in, uint8_t dr_out, int dr_len, int rti)
|
||||
static inline int dsp563xx_write_dr_u8(struct jtag_tap *tap, uint8_t *dr_in, uint8_t dr_out, int dr_len, int rti)
|
||||
{
|
||||
return dsp563xx_write_dr(tap, dr_in, &dr_out, dr_len, rti);
|
||||
}
|
||||
|
||||
/** */
|
||||
static inline int dsp563xx_write_dr_u32(struct jtag_tap *tap, uint32_t * dr_in, uint32_t dr_out, int dr_len, int rti)
|
||||
static inline int dsp563xx_write_dr_u32(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out, int dr_len, int rti)
|
||||
{
|
||||
return dsp563xx_write_dr(tap, (uint8_t *) dr_in, (uint8_t *) &dr_out, dr_len, rti);
|
||||
}
|
||||
|
@ -79,19 +79,19 @@ static inline int dsp563xx_once_ir_exec(struct jtag_tap *tap, int flush, uint8_t
|
|||
}
|
||||
|
||||
/* IR and DR functions */
|
||||
static inline int dsp563xx_write_ir(struct jtag_tap *tap, uint8_t * ir_in, uint8_t * ir_out, int ir_len, int rti)
|
||||
static inline int dsp563xx_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti)
|
||||
{
|
||||
jtag_add_plain_ir_scan(tap->ir_length, ir_out, ir_in, TAP_IDLE);
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static inline int dsp563xx_write_ir_u8(struct jtag_tap *tap, uint8_t * ir_in, uint8_t ir_out, int ir_len, int rti)
|
||||
static inline int dsp563xx_write_ir_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti)
|
||||
{
|
||||
return dsp563xx_write_ir(tap, ir_in, &ir_out, ir_len, rti);
|
||||
}
|
||||
|
||||
static inline int dsp563xx_jtag_sendinstr(struct jtag_tap *tap, uint8_t * ir_in, uint8_t ir_out)
|
||||
static inline int dsp563xx_jtag_sendinstr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out)
|
||||
{
|
||||
return dsp563xx_write_ir_u8(tap, ir_in, ir_out, tap->ir_length, 1);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ int dsp563xx_once_read_register(struct jtag_tap *tap, int flush, struct once_reg
|
|||
}
|
||||
|
||||
/** once read register with register len */
|
||||
int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint8_t len, uint32_t * data)
|
||||
int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint8_t len, uint32_t *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -212,7 +212,7 @@ int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint
|
|||
}
|
||||
|
||||
/** once read register */
|
||||
int dsp563xx_once_reg_read(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t * data)
|
||||
int dsp563xx_once_reg_read(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
|
|
@ -76,9 +76,9 @@ int dsp563xx_once_target_status(struct jtag_tap *tap);
|
|||
/** once read registers */
|
||||
int dsp563xx_once_read_register(struct jtag_tap *tap, int flush, struct once_reg *regs, int len);
|
||||
/** once read register */
|
||||
int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint8_t len, uint32_t * data);
|
||||
int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint8_t len, uint32_t *data);
|
||||
/** once read register */
|
||||
int dsp563xx_once_reg_read(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t * data);
|
||||
int dsp563xx_once_reg_read(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t *data);
|
||||
/** once write register */
|
||||
int dsp563xx_once_reg_write(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t data);
|
||||
/** single word instruction */
|
||||
|
|
|
@ -315,7 +315,7 @@ static inline struct dsp5680xx_common *target_to_dsp5680xx(struct target
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
int dsp5680xx_f_wr(struct target *target, const uint8_t * buffer, uint32_t address,
|
||||
int dsp5680xx_f_wr(struct target *target, const uint8_t *buffer, uint32_t address,
|
||||
uint32_t count, int is_flash_lock);
|
||||
|
||||
/**
|
||||
|
@ -329,7 +329,7 @@ int dsp5680xx_f_wr(struct target *target, const uint8_t * buffer, uint32_t addre
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
int dsp5680xx_f_erase_check(struct target *target, uint8_t * erased,
|
||||
int dsp5680xx_f_erase_check(struct target *target, uint8_t *erased,
|
||||
uint32_t sector);
|
||||
|
||||
/**
|
||||
|
@ -354,7 +354,7 @@ int dsp5680xx_f_erase(struct target *target, int first, int last);
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
int dsp5680xx_f_protect_check(struct target *target, uint16_t * protected);
|
||||
int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected);
|
||||
|
||||
/**
|
||||
* Writes the flash security words with a specific value. The chip's security will be
|
||||
|
|
|
@ -66,7 +66,7 @@ static int write_memory(struct target *target, target_addr_t address,
|
|||
uint32_t size, uint32_t count, const uint8_t *buffer);
|
||||
static int riscv013_test_sba_config_reg(struct target *target, target_addr_t legal_address,
|
||||
uint32_t num_words, target_addr_t illegal_address, bool run_sbbusyerror_test);
|
||||
void write_memory_sba_simple(struct target *target, target_addr_t addr, uint32_t* write_data,
|
||||
void write_memory_sba_simple(struct target *target, target_addr_t addr, uint32_t *write_data,
|
||||
uint32_t write_size, uint32_t sbcs);
|
||||
void read_memory_sba_simple(struct target *target, target_addr_t addr,
|
||||
uint32_t *rd_buf, uint32_t read_size, uint32_t sbcs);
|
||||
|
|
|
@ -2281,7 +2281,7 @@ static int target_read_buffer_default(struct target *target, target_addr_t addre
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int target_checksum_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t* crc)
|
||||
int target_checksum_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t *crc)
|
||||
{
|
||||
uint8_t *buffer;
|
||||
int retval;
|
||||
|
|
Loading…
Reference in New Issue