Skip to content

Commit

Permalink
remoteproc: fix print format warnings
Browse files Browse the repository at this point in the history
Fix compile warnings from GCC 4.6.1 when printing values of type size_t.

drivers/remoteproc/remoteproc_core.c:251:6:
warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 4 has type ‘size_t’ [-Wformat]
drivers/remoteproc/remoteproc_core.c:938:9:
warning: format ‘%u’ expects argument of type ‘unsigned int’,
but argument 4 has type ‘size_t’ [-Wformat]
drivers/remoteproc/remoteproc_core.c:1023:2:
warning: format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Sjur Brændeland authored and Ohad Ben-Cohen committed Jun 10, 2012
1 parent cfaf025 commit e981f6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ rproc_load_segments(struct rproc *rproc, const u8 *elf_data, size_t len)
}

if (offset + filesz > len) {
dev_err(dev, "truncated fw: need 0x%x avail 0x%x\n",
dev_err(dev, "truncated fw: need 0x%x avail 0x%zx\n",
offset + filesz, len);
ret = -EINVAL;
break;
Expand Down Expand Up @@ -934,7 +934,7 @@ static void rproc_resource_cleanup(struct rproc *rproc)
unmapped = iommu_unmap(rproc->domain, entry->da, entry->len);
if (unmapped != entry->len) {
/* nothing much to do besides complaining */
dev_err(dev, "failed to unmap %u/%u\n", entry->len,
dev_err(dev, "failed to unmap %u/%zu\n", entry->len,
unmapped);
}

Expand Down Expand Up @@ -1020,7 +1020,7 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)

ehdr = (struct elf32_hdr *)fw->data;

dev_info(dev, "Booting fw image %s, size %d\n", name, fw->size);
dev_info(dev, "Booting fw image %s, size %zd\n", name, fw->size);

/*
* if enabling an IOMMU isn't relevant for this rproc, this is
Expand Down

0 comments on commit e981f6d

Please sign in to comment.