target: convert 'unsigned' to 'unsigned int'

Conversion done with
	checkpatch --fix-inplace -types UNSPECIFIED_INT

Ignore the cast as they could be better addressed.
Fix only minor additional checkpatch issue (spacing and line
length).

Use Checkpatch-ignore below for the function pointers in the file
'armv7a_cache_l2x.h' that do not assign the identifier names to
the function arguments.
Most of these struct are unused and should be fixed or dropped.

Checkpatch-ignore: FUNCTION_ARGUMENTS

Change-Id: I8f27e68eb3502e431c1ba801b362358105f9f2dc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8480
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
Antonio Borneo
2024-09-08 21:20:48 +02:00
parent 2ad48b78d4
commit e72733d590
45 changed files with 248 additions and 246 deletions

View File

@@ -1330,14 +1330,14 @@ static int write_hw_reg_from_cache(struct target *t, int num)
/* x86 32 commands */
static void handle_iod_output(struct command_invocation *cmd,
struct target *target, uint32_t address, unsigned size,
unsigned count, const uint8_t *buffer)
struct target *target, uint32_t address, unsigned int size,
unsigned int count, const uint8_t *buffer)
{
const unsigned line_bytecnt = 32;
unsigned line_modulo = line_bytecnt / size;
const unsigned int line_bytecnt = 32;
unsigned int line_modulo = line_bytecnt / size;
char output[line_bytecnt * 4 + 1];
unsigned output_len = 0;
unsigned int output_len = 0;
const char *value_fmt;
switch (size) {
@@ -1356,7 +1356,7 @@ static void handle_iod_output(struct command_invocation *cmd,
return;
}
for (unsigned i = 0; i < count; i++) {
for (unsigned int i = 0; i < count; i++) {
if (i % line_modulo == 0) {
output_len += snprintf(output + output_len,
sizeof(output) - output_len,
@@ -1399,7 +1399,7 @@ COMMAND_HANDLER(handle_iod_command)
return ERROR_COMMAND_SYNTAX_ERROR;
}
unsigned size = 0;
unsigned int size = 0;
switch (CMD_NAME[2]) {
case 'w':
size = 4;
@@ -1413,7 +1413,7 @@ COMMAND_HANDLER(handle_iod_command)
default:
return ERROR_COMMAND_SYNTAX_ERROR;
}
unsigned count = 1;
unsigned int count = 1;
uint8_t *buffer = calloc(count, size);
struct target *target = get_current_target(CMD_CTX);
int retval = x86_32_common_read_io(target, address, size, buffer);
@@ -1425,7 +1425,7 @@ COMMAND_HANDLER(handle_iod_command)
static int target_fill_io(struct target *target,
uint32_t address,
unsigned data_size,
unsigned int data_size,
/* value */
uint32_t b)
{
@@ -1458,7 +1458,7 @@ COMMAND_HANDLER(handle_iow_command)
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], value);
struct target *target = get_current_target(CMD_CTX);
unsigned wordsize;
unsigned int wordsize;
switch (CMD_NAME[2]) {
case 'w':
wordsize = 4;