treewide: fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
ea53e1b572
commit
a01e54d201
|
@ -168,8 +168,8 @@ static inline unsigned long imx_v4_sdram_size(void __iomem *esdctlbase, int cs)
|
|||
static void add_mem(unsigned long base0, unsigned long size0,
|
||||
unsigned long base1, unsigned long size1)
|
||||
{
|
||||
debug("%s: cs0 base: 0x%08x cs0 size: 0x%08x\n", __func__, base0, size0);
|
||||
debug("%s: cs1 base: 0x%08x cs1 size: 0x%08x\n", __func__, base1, size1);
|
||||
debug("%s: cs0 base: 0x%08lx cs0 size: 0x%08lx\n", __func__, base0, size0);
|
||||
debug("%s: cs1 base: 0x%08lx cs1 size: 0x%08lx\n", __func__, base1, size1);
|
||||
|
||||
if (base0 + size0 == base1 && size1 > 0) {
|
||||
/*
|
||||
|
|
|
@ -89,7 +89,7 @@ void gpmc_generic_init(unsigned int cfg)
|
|||
* But NEVER run me in XIP mode! I will Die!
|
||||
*/
|
||||
while (x < GPMC_NUM_CS) {
|
||||
debug("gpmccs=%d Reg:0x%x <-0x0\n", x, reg);
|
||||
debug("gpmccs=%d Reg:0x%p <-0x0\n", x, reg);
|
||||
writel(0x0, reg);
|
||||
reg += GPMC_CONFIG_CS_SIZE;
|
||||
x++;
|
||||
|
@ -119,14 +119,14 @@ void gpmc_cs_config(char cs, struct gpmc_config *config)
|
|||
|
||||
/* Write the CFG1-6 regs */
|
||||
while (x < 6) {
|
||||
debug("gpmccfg%d Reg:0x%x <-0x%08x\n",
|
||||
debug("gpmccfg%d Reg:0x%p <-0x%08x\n",
|
||||
x, reg, config->cfg[x]);
|
||||
writel(config->cfg[x], reg);
|
||||
reg += GPMC_CONFIG_REG_OFF;
|
||||
x++;
|
||||
}
|
||||
/* reg now points to CFG7 */
|
||||
debug("gpmccfg%d Reg:0x%x <-0x%08x\n",
|
||||
debug("gpmccfg%d Reg:0x%p <-0x%08x\n",
|
||||
x, reg, (0x1 << 6) | /* CS enable */
|
||||
((config->size & 0xF) << 8) | /* Size */
|
||||
((config->base >> 24) & 0x3F));
|
||||
|
|
|
@ -52,8 +52,8 @@ void board_init_r (ulong end_of_ram)
|
|||
*/
|
||||
malloc_end = (_text_base - (128 << 10)) & ~(4095);
|
||||
|
||||
debug("malloc_end: 0x%08x\n", malloc_end);
|
||||
debug("TEXT_BASE after relocation: 0x%08x\n", _text_base);
|
||||
debug("malloc_end: 0x%08lx\n", malloc_end);
|
||||
debug("TEXT_BASE after relocation: 0x%08lx\n", _text_base);
|
||||
|
||||
mem_malloc_init((void *)(malloc_end - MALLOC_SIZE), (void *)(malloc_end - 1));
|
||||
|
||||
|
|
|
@ -106,11 +106,13 @@ int file_save_action(const char *filename, struct stat *statbuf,
|
|||
memcpy(data->writep, path, len);
|
||||
inode->size = ENVFS_32(len);
|
||||
data->writep += PAD4(len);
|
||||
debug("handling symlink %s size %ld namelen %d headerlen %d\n", filename + strlen(data->base),
|
||||
len, namelen, ENVFS_32(inode->headerlen));
|
||||
debug("handling symlink %s size %d namelen %d headerlen %d\n",
|
||||
filename + strlen(data->base),
|
||||
len, namelen, ENVFS_32(inode->headerlen));
|
||||
} else {
|
||||
debug("handling file %s size %ld namelen %d headerlen %d\n", filename + strlen(data->base),
|
||||
statbuf->st_size, namelen, ENVFS_32(inode->headerlen));
|
||||
debug("handling file %s size %lld namelen %d headerlen %d\n",
|
||||
filename + strlen(data->base),
|
||||
statbuf->st_size, namelen, ENVFS_32(inode->headerlen));
|
||||
|
||||
inode->size = ENVFS_32(statbuf->st_size);
|
||||
fd = open(filename, O_RDONLY);
|
||||
|
|
|
@ -937,14 +937,12 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi)
|
|||
return rcode;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/* broken, of course, but OK for testing */
|
||||
static char *indenter(int i)
|
||||
static __maybe_unused char *indenter(int i)
|
||||
{
|
||||
static char blanks[] = " ";
|
||||
return &blanks[sizeof(blanks) - i - 1];
|
||||
}
|
||||
#endif
|
||||
|
||||
/* return code is the exit status of the pipe */
|
||||
static int free_pipe(struct pipe *pi, int indent)
|
||||
|
|
|
@ -104,7 +104,7 @@ static int simplify_symbols(Elf32_Shdr *sechdrs,
|
|||
sym[i].st_value
|
||||
= resolve_symbol(sechdrs,
|
||||
strtab + sym[i].st_name);
|
||||
debug("undef : %20s 0x%08x 0x%08lx\n", strtab + sym[i].st_name, sym[i].st_value);
|
||||
debug("undef : %20s 0x%08x\n", strtab + sym[i].st_name, sym[i].st_value);
|
||||
|
||||
/* Ok if resolved. */
|
||||
if (sym[i].st_value != 0)
|
||||
|
|
|
@ -58,9 +58,7 @@ static void process_macros (const char *input, char *output)
|
|||
/* 1 = waiting for '(' or '{' */
|
||||
/* 2 = waiting for ')' or '}' */
|
||||
/* 3 = waiting for ''' */
|
||||
#ifdef DEBUG
|
||||
char *output_start = output;
|
||||
#endif
|
||||
char __maybe_unused *output_start = output;
|
||||
|
||||
pr_debug("[PROCESS_MACROS] INPUT len %d: \"%s\"\n", strlen (input),
|
||||
input);
|
||||
|
|
|
@ -43,15 +43,21 @@ struct resource *request_region(struct resource *parent,
|
|||
struct resource *r, *new;
|
||||
|
||||
if (end < start) {
|
||||
debug("%s: request region 0x%08x:0x%08x: end < start\n",
|
||||
__func__, start, end);
|
||||
debug("%s: request region 0x%08llx:0x%08llx: end < start\n",
|
||||
__func__,
|
||||
(unsigned long long)start,
|
||||
(unsigned long long)end);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* outside parent resource? */
|
||||
if (start < parent->start || end > parent->end) {
|
||||
debug("%s: 0x%08x:0x%08x outside parent resource 0x%08x:0x%08x\n",
|
||||
__func__, start, end, parent->start, parent->end);
|
||||
debug("%s: 0x%08llx:0x%08llx outside parent resource 0x%08llx:0x%08llx\n",
|
||||
__func__,
|
||||
(unsigned long long)start,
|
||||
(unsigned long long)end,
|
||||
(unsigned long long)parent->start,
|
||||
(unsigned long long)parent->end);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -64,13 +70,19 @@ struct resource *request_region(struct resource *parent,
|
|||
goto ok;
|
||||
if (start > r->end)
|
||||
continue;
|
||||
debug("%s: 0x%08x:0x%08x conflicts with 0x%08x:0x%08x\n",
|
||||
__func__, start, end, r->start, r->end);
|
||||
debug("%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n",
|
||||
__func__,
|
||||
(unsigned long long)start,
|
||||
(unsigned long long)end,
|
||||
(unsigned long long)r->start,
|
||||
(unsigned long long)r->end);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ok:
|
||||
debug("%s ok: 0x%08x:0x%08x\n", __func__, start, end);
|
||||
debug("%s ok: 0x%08llx:0x%08llx\n", __func__,
|
||||
(unsigned long long)start,
|
||||
(unsigned long long)end);
|
||||
|
||||
new = xzalloc(sizeof(*new));
|
||||
init_resource(new, name);
|
||||
|
|
|
@ -440,8 +440,9 @@ struct resource *uimage_load_to_sdram(struct uimage_handle *handle,
|
|||
uimage_resource = request_sdram_region("uimage",
|
||||
start, size);
|
||||
if (!uimage_resource) {
|
||||
printf("unable to request SDRAM 0x%08x-0x%08x\n",
|
||||
start, start + size - 1);
|
||||
printf("unable to request SDRAM 0x%08llx-0x%08llx\n",
|
||||
(unsigned long long)start,
|
||||
(unsigned long long)start + size - 1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -724,7 +724,7 @@ static int mxs_mci_probe(struct device_d *hw_dev)
|
|||
mxs_mci->index = 3;
|
||||
break;
|
||||
default:
|
||||
pr_debug("Unknown SSP unit at address 0x%08x\n", mxs_mci->regs);
|
||||
pr_debug("Unknown SSP unit at address 0x%p\n", mxs_mci->regs);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -461,7 +461,7 @@ static int __cfi_erase(struct cdev *cdev, size_t count, loff_t offset,
|
|||
unsigned long start, end;
|
||||
int i, ret = 0;
|
||||
|
||||
debug("%s: erase 0x%08lx (size %d)\n", __func__, offset, count);
|
||||
debug("%s: erase 0x%08llx (size %zu)\n", __func__, offset, count);
|
||||
|
||||
start = find_sector(finfo, (unsigned long)finfo->base + offset);
|
||||
end = find_sector(finfo, (unsigned long)finfo->base + offset +
|
||||
|
@ -633,7 +633,7 @@ static int cfi_protect(struct cdev *cdev, size_t count, loff_t offset, int prot)
|
|||
int i, ret = 0;
|
||||
const char *action = (prot? "protect" : "unprotect");
|
||||
|
||||
printf("%s: %s 0x%p (size %d)\n", __func__,
|
||||
printf("%s: %s 0x%p (size %zu)\n", __func__,
|
||||
action, finfo->base + offset, count);
|
||||
|
||||
start = find_sector(finfo, (unsigned long)finfo->base + offset);
|
||||
|
@ -654,7 +654,8 @@ static ssize_t cfi_write(struct cdev *cdev, const void *buf, size_t count, loff_
|
|||
struct flash_info *finfo = (struct flash_info *)cdev->priv;
|
||||
int ret;
|
||||
|
||||
debug("cfi_write: buf=0x%p addr=0x%08lx count=0x%08x\n",buf, finfo->base + offset, count);
|
||||
debug("cfi_write: buf=0x%p addr=0x%p count=0x%08zx\n",
|
||||
buf, finfo->base + offset, count);
|
||||
|
||||
ret = write_buff(finfo, buf, (unsigned long)finfo->base + offset, count);
|
||||
return ret == 0 ? count : -1;
|
||||
|
@ -840,7 +841,10 @@ void flash_write_cmd(struct flash_info *info, flash_sect_t sect,
|
|||
|
||||
addr = flash_make_addr (info, sect, offset);
|
||||
flash_make_cmd (info, cmd, &cword);
|
||||
debug("%s: %p %lX %X => %p %llX\n", __FUNCTION__, info, sect, offset, addr, cword);
|
||||
|
||||
debug("%s: %p %lX %X => %p " CFI_WORD_FMT "\n", __func__,
|
||||
info, sect, offset, addr, cword);
|
||||
|
||||
flash_write_word(info, cword, addr);
|
||||
}
|
||||
|
||||
|
@ -862,7 +866,7 @@ int flash_isequal(struct flash_info *info, flash_sect_t sect,
|
|||
debug ("is= %4.4x %4.4x\n", flash_read16(addr), (u16)cword);
|
||||
retval = (flash_read16(addr) == cword);
|
||||
} else if (bankwidth_is_4(info)) {
|
||||
debug ("is= %8.8lx %8.8lx\n", flash_read32(addr), (u32)cword);
|
||||
debug ("is= %8.8x %8.8x\n", flash_read32(addr), (u32)cword);
|
||||
retval = (flash_read32(addr) == cword);
|
||||
} else if (bankwidth_is_8(info)) {
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -29,12 +29,16 @@ typedef unsigned long flash_sect_t;
|
|||
|
||||
#if defined(CONFIG_DRIVER_CFI_BANK_WIDTH_8)
|
||||
typedef u64 cfiword_t;
|
||||
#define CFI_WORD_FMT "0x%016llx"
|
||||
#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_4)
|
||||
typedef u32 cfiword_t;
|
||||
#define CFI_WORD_FMT "0x%08x"
|
||||
#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_2)
|
||||
typedef u16 cfiword_t;
|
||||
#define CFI_WORD_FMT "0x%04x"
|
||||
#else
|
||||
typedef u8 cfiword_t;
|
||||
#define CFI_WORD_FMT "0x%02x"
|
||||
#endif
|
||||
|
||||
struct cfi_cmd_set;
|
||||
|
|
|
@ -512,7 +512,7 @@ static int tftp_write(struct device_d *_dev, FILE *f, const void *inbuf,
|
|||
size_t size, now;
|
||||
int ret;
|
||||
|
||||
debug("%s: %d\n", __func__, insize);
|
||||
debug("%s: %zu\n", __func__, insize);
|
||||
|
||||
size = insize;
|
||||
|
||||
|
@ -547,7 +547,7 @@ static int tftp_read(struct device_d *dev, FILE *f, void *buf, size_t insize)
|
|||
size_t outsize = 0, now;
|
||||
int ret;
|
||||
|
||||
debug("%s %d\n", __func__, insize);
|
||||
debug("%s %zu\n", __func__, insize);
|
||||
|
||||
tftp_timer_reset(priv);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ struct image *bmp_open(char *inbuf, int insize)
|
|||
img->bits_per_pixel = le16_to_cpu(bmp->header.bit_count);
|
||||
|
||||
pr_debug("bmp: %d x %d x %d data@0x%p\n", img->width, img->height,
|
||||
img->bit_per_pixel, img->data);
|
||||
img->bits_per_pixel, img->data);
|
||||
|
||||
return img;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void *xmalloc(size_t size)
|
|||
if (!(p = malloc(size)))
|
||||
panic("ERROR: out of memory\n");
|
||||
|
||||
debug("xmalloc %p (size %d)\n", p, size);
|
||||
debug("xmalloc %p (size %zu)\n", p, size);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void *xrealloc(void *ptr, size_t size)
|
|||
if (!(p = realloc(ptr, size)))
|
||||
panic("ERROR: out of memory\n");
|
||||
|
||||
debug("xrealloc %p -> %p (size %d)\n", ptr, p, size);
|
||||
debug("xrealloc %p -> %p (size %zu)\n", ptr, p, size);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue