Commit 09d33735 authored by Alessandro Rubini's avatar Alessandro Rubini

kernel: fix a few warnings

Building for a 64-bit kernel, I found a few warnings, related
to printk format strings.  I'm thus using %zi and %ti for size_t
and ptrdiff_t, resp.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 55812ecd
......@@ -167,7 +167,7 @@ int ff_eeprom_write(struct fmc_device *fmc, uint32_t offset,
return -EINVAL;
if (offset + size > FF_EEPROM_SIZE)
size = FF_EEPROM_SIZE - offset;
pr_info("%s: size %i\n", __func__, size);
pr_info("%s: size %zi\n", __func__, size);
memcpy(ff_eeimg + offset, buf, size);
schedule_delayed_work(&ff->work, HZ * 2); /* remove, replug, in 2s */
return size;
......
......@@ -42,7 +42,7 @@ static int fwe_run_tlv(struct fmc_device *fmc, const struct firmware *fw,
thisaddr = get_unaligned_le16(p+1);
thislen = get_unaligned_le16(p+3);
if (p[0] != 'w' || thislen + 5 > len) {
dev_err(fmc->hwdev, "invalid tlv at offset %i\n",
dev_err(fmc->hwdev, "invalid tlv at offset %ti\n",
p - fw->data);
return -EINVAL;
}
......@@ -69,7 +69,7 @@ static int fwe_run_bin(struct fmc_device *fmc, const struct firmware *fw)
{
int ret;
dev_info(fmc->hwdev, "programming %i bytes\n", fw->size);
dev_info(fmc->hwdev, "programming %zi bytes\n", fw->size);
ret = fmc->op->write_ee(fmc, 0, (void *)fw->data, fw->size);
if (ret < 0) {
dev_info(fmc->hwdev, "write_eeprom: error %i\n", ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment