Commit 637fa2a0 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] more size_t portability fixes

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1665f0ee
...@@ -1196,7 +1196,7 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, const char __user *buf ...@@ -1196,7 +1196,7 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, const char __user *buf
int status; int status;
char fragbuf[HOST_LINK_BUF_SIZE]; char fragbuf[HOST_LINK_BUF_SIZE];
int fragpos = 0; int fragpos = 0;
int fraglen; size_t fraglen;
unsigned long timeout; unsigned long timeout;
int written; int written;
...@@ -1257,7 +1257,7 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private* ca, int* resu ...@@ -1257,7 +1257,7 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private* ca, int* resu
int slot; int slot;
int slot_count = 0; int slot_count = 0;
int idx; int idx;
int fraglen; size_t fraglen;
int connection_id = -1; int connection_id = -1;
int found = 0; int found = 0;
u8 hdr[2]; u8 hdr[2];
......
...@@ -563,7 +563,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len, ...@@ -563,7 +563,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
if (buffer2 != 0) if (buffer2 != 0)
printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2); printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2);
if (buffer1_len > 32768) if (buffer1_len > 32768)
printk(KERN_WARNING "length > 32k: %u.\n", buffer1_len); printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
/* printk("TS callback: %u bytes, %u TS cells @ %p.\n", /* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
buffer1_len, buffer1_len / TS_SZ, buffer1); */ buffer1_len, buffer1_len / TS_SZ, buffer1); */
dvb_net_ule(dev, buffer1, buffer1_len); dvb_net_ule(dev, buffer1, buffer1_len);
......
...@@ -1181,7 +1181,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) ...@@ -1181,7 +1181,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
firmware_size = fw_entry->size; firmware_size = fw_entry->size;
if (firmware_size < 60) { if (firmware_size < 60) {
printk("%s: firmware size too small for DSP code (%u < 60).\n", printk("%s: firmware size too small for DSP code (%zu < 60).\n",
__FUNCTION__, firmware_size); __FUNCTION__, firmware_size);
return -1; return -1;
} }
......
...@@ -2416,7 +2416,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason) ...@@ -2416,7 +2416,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason)
} }
} else { } else {
printk(MYIOC_s_ERR_FMT printk(MYIOC_s_ERR_FMT
"Invalid IOC facts reply, msgLength=%d offsetof=%d!\n", "Invalid IOC facts reply, msgLength=%d offsetof=%zd!\n",
ioc->name, facts->MsgLength, (offsetof(IOCFactsReply_t, ioc->name, facts->MsgLength, (offsetof(IOCFactsReply_t,
RequestFrameSize)/sizeof(u32))); RequestFrameSize)/sizeof(u32)));
return -66; return -66;
......
...@@ -269,7 +269,8 @@ static int memcmpb(void *a, int c, int n) ...@@ -269,7 +269,8 @@ static int memcmpb(void *a, int c, int n)
static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int len, static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int len,
int check_oob) int check_oob)
{ {
int i, retlen; int i;
size_t retlen;
u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize]; u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize];
for (i = 0; i < len; i += SECTORSIZE) { for (i = 0; i < len; i += SECTORSIZE) {
...@@ -366,7 +367,8 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b ...@@ -366,7 +367,8 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b
{ {
unsigned int block, i, status; unsigned int block, i, status;
struct nftl_bci bci; struct nftl_bci bci;
int sectors_per_block, retlen; int sectors_per_block;
size_t retlen;
sectors_per_block = nftl->EraseSize / SECTORSIZE; sectors_per_block = nftl->EraseSize / SECTORSIZE;
block = first_block; block = first_block;
......
...@@ -2096,7 +2096,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof ...@@ -2096,7 +2096,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof
unsigned copied=0; unsigned copied=0;
CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4,
printk("cs46xx: cs_read()+ %d\n",count) ); printk("cs46xx: cs_read()+ %zd\n",count) );
state = (struct cs_state *)card->states[0]; state = (struct cs_state *)card->states[0];
if(!state) if(!state)
return -ENODEV; return -ENODEV;
...@@ -2157,9 +2157,9 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof ...@@ -2157,9 +2157,9 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof
} }
CS_DBGOUT(CS_WAVE_READ, 2, printk(KERN_INFO CS_DBGOUT(CS_WAVE_READ, 2, printk(KERN_INFO
"_read() copy_to cnt=%d count=%d ", cnt,count) ); "_read() copy_to cnt=%d count=%zd ", cnt,count) );
CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO
" .dmasize=%d .count=%d buffer=%p ret=%d\n", " .dmasize=%d .count=%d buffer=%p ret=%zd\n",
dmabuf->dmasize,dmabuf->count,buffer,ret) ); dmabuf->dmasize,dmabuf->count,buffer,ret) );
if (cs_copy_to_user(state, buffer, if (cs_copy_to_user(state, buffer,
...@@ -2184,7 +2184,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof ...@@ -2184,7 +2184,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof
up(&state->sem); up(&state->sem);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4,
printk("cs46xx: cs_read()- %d\n",ret) ); printk("cs46xx: cs_read()- %zd\n",ret) );
return ret; return ret;
} }
...@@ -2202,7 +2202,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou ...@@ -2202,7 +2202,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou
int cnt; int cnt;
CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 4, CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 4,
printk("cs46xx: cs_write called, count = %d\n", count) ); printk("cs46xx: cs_write called, count = %zd\n", count) );
state = (struct cs_state *)card->states[1]; state = (struct cs_state *)card->states[1];
if(!state) if(!state)
return -ENODEV; return -ENODEV;
...@@ -2309,7 +2309,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou ...@@ -2309,7 +2309,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 2, CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 2,
printk("cs46xx: cs_write()- ret=0x%x\n", ret) ); printk("cs46xx: cs_write()- ret=%zd\n", ret) );
return ret; return 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