Skip to content

Commit

Permalink
bcm2835_smi: suppress warnings
Browse files Browse the repository at this point in the history
The '%d' printk modifier was used twice to print a size_t variable.
This generates a warning on 64 bit architectures.
Use the proper '%zu' format.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
  • Loading branch information
teknoraver authored and pelwell committed Oct 8, 2019
1 parent 7c1de3f commit a17609c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/broadcom/bcm2835_smi_dev.c
Expand Up @@ -192,7 +192,7 @@ bcm2835_read_file(struct file *f, char __user *user_ptr,
{
int odd_bytes;

dev_dbg(inst->dev, "User reading %d bytes from SMI.", count);
dev_dbg(inst->dev, "User reading %zu bytes from SMI.", count);
/* We don't want to DMA a number of bytes % 4 != 0 (32 bit FIFO) */
if (count > DMA_THRESHOLD_BYTES)
odd_bytes = count & 0x3;
Expand Down Expand Up @@ -228,7 +228,7 @@ bcm2835_write_file(struct file *f, const char __user *user_ptr,
{
int odd_bytes;

dev_dbg(inst->dev, "User writing %d bytes to SMI.", count);
dev_dbg(inst->dev, "User writing %zu bytes to SMI.", count);
if (count > DMA_THRESHOLD_BYTES)
odd_bytes = count & 0x3;
else
Expand Down

0 comments on commit a17609c

Please sign in to comment.