jtag/commands: Use 'unsigned int' data type

This patch modifies as little code as possible in order to simplify the
review. Data types that are affected by these changes will be addresses
in following patches.

While at it, apply coding style fixes if these are not too extensive.

Change-Id: Ie048b3d472f546fecb6733f17f9d0f17fda40187
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8404
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink
2024-07-17 17:35:42 +02:00
committed by Antonio Borneo
parent 42450345dd
commit 0847a4d7fb
31 changed files with 201 additions and 239 deletions

View File

@@ -58,11 +58,12 @@ static int esirisc_jtag_get_padding(void)
return padding;
}
static int esirisc_jtag_count_bits(int num_fields, struct scan_field *fields)
static int esirisc_jtag_count_bits(unsigned int num_fields,
struct scan_field *fields)
{
int bit_count = 0;
for (int i = 0; i < num_fields; ++i)
for (unsigned int i = 0; i < num_fields; ++i)
bit_count += fields[i].num_bits;
return bit_count;