Commit 0f2a1ee1 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

V4L/DVB (8305): sms1xxx: fix warning: format '%d' expects type 'int', but...

V4L/DVB (8305): sms1xxx: fix warning: format '%d' expects type 'int', but argument x has type 'size_t'

Fix the following 64bit build warning:

make[2]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  smscoreapi.o
smscoreapi.c: In function 'smscore_load_firmware_from_file':
smscoreapi.c:604: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
  CC [M]  smsusb.o
smsusb.c: In function 'smsusb1_load_firmware':
smsusb.c:216: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
smsusb.c:223: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 8f37356b
...@@ -601,7 +601,7 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, ...@@ -601,7 +601,7 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
sms_info("failed to open \"%s\"", filename); sms_info("failed to open \"%s\"", filename);
return rc; return rc;
} }
sms_info("read FW %s, size=%d", filename, fw->size); sms_info("read FW %s, size=%zd", filename, fw->size);
fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
GFP_KERNEL | GFP_DMA); GFP_KERNEL | GFP_DMA);
if (fw_buffer) { if (fw_buffer) {
......
...@@ -209,14 +209,14 @@ static int smsusb1_load_firmware(struct usb_device *udev, int id) ...@@ -209,14 +209,14 @@ static int smsusb1_load_firmware(struct usb_device *udev, int id)
rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2), rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2),
fw_buffer, fw->size, &dummy, 1000); fw_buffer, fw->size, &dummy, 1000);
sms_info("sent %d(%d) bytes, rc %d", fw->size, dummy, rc); sms_info("sent %zd(%d) bytes, rc %d", fw->size, dummy, rc);
kfree(fw_buffer); kfree(fw_buffer);
} else { } else {
sms_err("failed to allocate firmware buffer"); sms_err("failed to allocate firmware buffer");
rc = -ENOMEM; rc = -ENOMEM;
} }
sms_info("read FW %s, size=%d", smsusb1_fw_lkup[id], fw->size); sms_info("read FW %s, size=%zd", smsusb1_fw_lkup[id], fw->size);
release_firmware(fw); release_firmware(fw);
......
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