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
int status;
char fragbuf[HOST_LINK_BUF_SIZE];
int fragpos = 0;
int fraglen;
size_t fraglen;
unsigned long timeout;
int written;
......@@ -1257,7 +1257,7 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private* ca, int* resu
int slot;
int slot_count = 0;
int idx;
int fraglen;
size_t fraglen;
int connection_id = -1;
int found = 0;
u8 hdr[2];
......
......@@ -563,7 +563,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
if (buffer2 != 0)
printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2);
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",
buffer1_len, buffer1_len / TS_SZ, buffer1); */
dvb_net_ule(dev, buffer1, buffer1_len);
......
......@@ -1181,7 +1181,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
firmware_size = fw_entry->size;
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);
return -1;
}
......
......@@ -2416,7 +2416,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason)
}
} else {
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,
RequestFrameSize)/sizeof(u32)));
return -66;
......
......@@ -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,
int check_oob)
{
int i, retlen;
int i;
size_t retlen;
u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize];
for (i = 0; i < len; i += SECTORSIZE) {
......@@ -366,7 +367,8 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b
{
unsigned int block, i, status;
struct nftl_bci bci;
int sectors_per_block, retlen;
int sectors_per_block;
size_t retlen;
sectors_per_block = nftl->EraseSize / SECTORSIZE;
block = first_block;
......
......@@ -2096,7 +2096,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof
unsigned copied=0;
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];
if(!state)
return -ENODEV;
......@@ -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
"_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
" .dmasize=%d .count=%d buffer=%p ret=%d\n",
" .dmasize=%d .count=%d buffer=%p ret=%zd\n",
dmabuf->dmasize,dmabuf->count,buffer,ret) );
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
up(&state->sem);
set_current_state(TASK_RUNNING);
CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4,
printk("cs46xx: cs_read()- %d\n",ret) );
printk("cs46xx: cs_read()- %zd\n",ret) );
return ret;
}
......@@ -2202,7 +2202,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou
int cnt;
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];
if(!state)
return -ENODEV;
......@@ -2309,7 +2309,7 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou
set_current_state(TASK_RUNNING);
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;
}
......
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