treewide: fix signedness mixups in printf format specifiers
This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
86afb22eae
commit
9c63e92baa
|
@ -347,7 +347,7 @@ static int do_cpufreq(int argc, char *argv[])
|
|||
return COMMAND_ERROR_USAGE;
|
||||
}
|
||||
|
||||
printf("Switched CPU frequency to %ldMHz\n", freq);
|
||||
printf("Switched CPU frequency to %luMHz\n", freq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ static int do_cpufreq(int argc, char *argv[])
|
|||
return COMMAND_ERROR_USAGE;
|
||||
}
|
||||
|
||||
printf("Switched CPU frequency to %ldMHz\n", freq);
|
||||
printf("Switched CPU frequency to %luMHz\n", freq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ static int do_cpufreq(int argc, char *argv[])
|
|||
return COMMAND_ERROR_USAGE;
|
||||
}
|
||||
|
||||
printf("Switched CPU frequency to %ldMHz\n", freq);
|
||||
printf("Switched CPU frequency to %luMHz\n", freq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -281,12 +281,12 @@ static int imx_bbu_internal_v2_write_nand_dbbt(struct imx_internal_bbu_handler *
|
|||
}
|
||||
}
|
||||
|
||||
debug("total image size: 0x%08x. Space needed including bad blocks: 0x%08x\n",
|
||||
debug("total image size: 0x%08zx. Space needed including bad blocks: 0x%08zx\n",
|
||||
data->len + 0x8000,
|
||||
data->len + 0x8000 + *num_bb * blocksize);
|
||||
|
||||
if (data->len + 0x8000 + *num_bb * blocksize > imx_handler->device_size) {
|
||||
printf("needed space (0x%08x) exceeds partition space (0x%08x)\n",
|
||||
printf("needed space (0x%08zx) exceeds partition space (0x%08zx)\n",
|
||||
data->len + 0x8000 + *num_bb * blocksize,
|
||||
imx_handler->device_size);
|
||||
ret = -ENOSPC;
|
||||
|
|
|
@ -161,7 +161,7 @@ static void print_stats(int nr_passes, int length)
|
|||
* nr_passes);
|
||||
|
||||
for (i = 0; i < MAX_ECC_BITS; i++)
|
||||
printf("ECC %d bit error(s) : %d\n", i + 1, ecc_stats[i]);
|
||||
printf("ECC %d bit error(s) : %u\n", i + 1, ecc_stats[i]);
|
||||
|
||||
printf("ECC >%d bit error(s) : %u\n", MAX_ECC_BITS, ecc_stats_over);
|
||||
printf("ECC corrections failed : %u\n", ecc_failed_cnt);
|
||||
|
|
|
@ -37,7 +37,7 @@ static int do_time(int argc, char *argv[])
|
|||
|
||||
diff = diff64;
|
||||
|
||||
printf("time: %ldms\n", diff);
|
||||
printf("time: %lums\n", diff);
|
||||
|
||||
free(buf);
|
||||
|
||||
|
|
|
@ -97,5 +97,5 @@ void malloc_stats(void)
|
|||
|
||||
tlsf_walk_heap(tlsf_mem_pool, malloc_walker, &s);
|
||||
|
||||
printf("used: %10d\nfree: %10d\n", s.used, s.free);
|
||||
printf("used: %10zu\nfree: %10zu\n", s.used, s.free);
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ static void dump_one(struct clk *clk, int verbose, int indent)
|
|||
{
|
||||
struct clk *c;
|
||||
|
||||
printf("%*s%s (rate %ld, %sabled)\n", indent * 4, "", clk->name, clk_get_rate(clk),
|
||||
printf("%*s%s (rate %lu, %sabled)\n", indent * 4, "", clk->name, clk_get_rate(clk),
|
||||
clk_is_enabled(clk) ? "en" : "dis");
|
||||
if (verbose) {
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ static void jtag_info(struct device_d *pdev)
|
|||
struct jtag_info *info = pdev->priv;
|
||||
|
||||
printf(" JTAG:\n");
|
||||
printf(" Devices found: %d\n", info->devices);
|
||||
printf(" Devices found: %u\n", info->devices);
|
||||
for (dn = 0; dn < info->devices; dn++) {
|
||||
jid.device = dn;
|
||||
ret = jtag_ioctl(&info->cdev, JTAG_GET_ID, &jid);
|
||||
|
|
|
@ -706,12 +706,12 @@ int usb_get_configuration_no(struct usb_device *dev,
|
|||
|
||||
if (tmp > USB_BUFSIZ) {
|
||||
USB_PRINTF("usb_get_configuration_no: failed to get " \
|
||||
"descriptor - too long: %d\n", tmp);
|
||||
"descriptor - too long: %u\n", tmp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, tmp);
|
||||
USB_PRINTF("get_conf_no %d Result %d, wLength %d\n",
|
||||
USB_PRINTF("get_conf_no %d Result %d, wLength %u\n",
|
||||
cfgno, result, tmp);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ char *size_human_readable(unsigned long long size)
|
|||
|
||||
ptr += sprintf(buf, "%lu", n);
|
||||
if (m) {
|
||||
ptr += sprintf(ptr, ".%ld", m);
|
||||
ptr += sprintf(ptr, ".%lu", m);
|
||||
}
|
||||
sprintf(ptr, " %ciB", c);
|
||||
|
||||
|
|
|
@ -800,7 +800,7 @@ int main(int argc, char **argv)
|
|||
#ifdef ALLOC_DEBUG
|
||||
png_alloc_node_t *node;
|
||||
for (node = png_alloc_head, n = 1; node; node = node->next, n++)
|
||||
printf("node %d (%p) addr = %p, size = %ld\n", n, node, node->addr, node->size);
|
||||
printf("node %d (%p) addr = %p, size = %zu\n", n, node, node->addr, node->size);
|
||||
#endif
|
||||
png_alloc_free_all(); // also frees info and image data from PNG_decode
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ static void write_src(void)
|
|||
printf("\n");
|
||||
|
||||
output_label("kallsyms_num_syms");
|
||||
printf("\tPTR\t%d\n", table_cnt);
|
||||
printf("\tPTR\t%u\n", table_cnt);
|
||||
printf("\n");
|
||||
|
||||
/* table of offset markers, that give the offset in the compressed stream
|
||||
|
@ -315,7 +315,7 @@ static void write_src(void)
|
|||
|
||||
output_label("kallsyms_markers");
|
||||
for (i = 0; i < ((table_cnt + 255) >> 8); i++)
|
||||
printf("\tPTR\t%d\n", markers[i]);
|
||||
printf("\tPTR\t%u\n", markers[i]);
|
||||
printf("\n");
|
||||
|
||||
free(markers);
|
||||
|
@ -332,7 +332,7 @@ static void write_src(void)
|
|||
|
||||
output_label("kallsyms_token_index");
|
||||
for (i = 0; i < 256; i++)
|
||||
printf("\t.short\t%d\n", best_idx[i]);
|
||||
printf("\t.short\t%u\n", best_idx[i]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -1265,7 +1265,7 @@ static void image_dump_config(struct image_cfg_element *image_cfg,
|
|||
struct image_cfg_element *e = &image_cfg[cfgi];
|
||||
switch (e->type) {
|
||||
case IMAGE_CFG_VERSION:
|
||||
printf("VERSION %d\n", e->version);
|
||||
printf("VERSION %u\n", e->version);
|
||||
break;
|
||||
case IMAGE_CFG_BOOT_FROM:
|
||||
printf("BOOTFROM %s\n",
|
||||
|
|
Loading…
Reference in New Issue