Commit 605102e5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove size_t-based printk warnings

From: "Randy.Dunlap" <rddunlap@osdl.org>

This patch removes warnings on non-matching parameter types to printk
and incorrect function types (n_hdlc).
parent a776ac8d
...@@ -2345,7 +2345,7 @@ static int __init eni_init(void) ...@@ -2345,7 +2345,7 @@ static int __init eni_init(void)
struct sk_buff *skb; /* dummy for sizeof */ struct sk_buff *skb; /* dummy for sizeof */
if (sizeof(skb->cb) < sizeof(struct eni_skb_prv)) { if (sizeof(skb->cb) < sizeof(struct eni_skb_prv)) {
printk(KERN_ERR "eni_detect: skb->cb is too small (%d < %d)\n", printk(KERN_ERR "eni_detect: skb->cb is too small (%Zd < %Zd)\n",
sizeof(skb->cb),sizeof(struct eni_skb_prv)); sizeof(skb->cb),sizeof(struct eni_skb_prv));
return -EIO; return -EIO;
} }
......
...@@ -895,7 +895,7 @@ static int fs_open(struct atm_vcc *atm_vcc, short vpi, int vci) ...@@ -895,7 +895,7 @@ static int fs_open(struct atm_vcc *atm_vcc, short vpi, int vci)
/* XXX handle qos parameters (rate limiting) ? */ /* XXX handle qos parameters (rate limiting) ? */
vcc = kmalloc(sizeof(struct fs_vcc), GFP_KERNEL); vcc = kmalloc(sizeof(struct fs_vcc), GFP_KERNEL);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc VCC: %p(%d)\n", vcc, sizeof(struct fs_vcc)); fs_dprintk (FS_DEBUG_ALLOC, "Alloc VCC: %p(%Zd)\n", vcc, sizeof(struct fs_vcc));
if (!vcc) { if (!vcc) {
clear_bit(ATM_VF_ADDR, &atm_vcc->flags); clear_bit(ATM_VF_ADDR, &atm_vcc->flags);
return -ENOMEM; return -ENOMEM;
...@@ -946,7 +946,7 @@ static int fs_open(struct atm_vcc *atm_vcc, short vpi, int vci) ...@@ -946,7 +946,7 @@ static int fs_open(struct atm_vcc *atm_vcc, short vpi, int vci)
if (DO_DIRECTION (txtp)) { if (DO_DIRECTION (txtp)) {
tc = kmalloc (sizeof (struct fs_transmit_config), GFP_KERNEL); tc = kmalloc (sizeof (struct fs_transmit_config), GFP_KERNEL);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc tc: %p(%d)\n", fs_dprintk (FS_DEBUG_ALLOC, "Alloc tc: %p(%Zd)\n",
tc, sizeof (struct fs_transmit_config)); tc, sizeof (struct fs_transmit_config));
if (!tc) { if (!tc) {
fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n"); fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n");
...@@ -1180,7 +1180,7 @@ static int fs_send (struct atm_vcc *atm_vcc, struct sk_buff *skb) ...@@ -1180,7 +1180,7 @@ static int fs_send (struct atm_vcc *atm_vcc, struct sk_buff *skb)
vcc->last_skb = skb; vcc->last_skb = skb;
td = kmalloc (sizeof (struct FS_BPENTRY), GFP_ATOMIC); td = kmalloc (sizeof (struct FS_BPENTRY), GFP_ATOMIC);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc transd: %p(%d)\n", td, sizeof (struct FS_BPENTRY)); fs_dprintk (FS_DEBUG_ALLOC, "Alloc transd: %p(%Zd)\n", td, sizeof (struct FS_BPENTRY));
if (!td) { if (!td) {
/* Oops out of mem */ /* Oops out of mem */
return -ENOMEM; return -ENOMEM;
...@@ -1487,7 +1487,7 @@ static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags) ...@@ -1487,7 +1487,7 @@ static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags)
fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-skb: %p(%d)\n", skb, fp->bufsize); fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-skb: %p(%d)\n", skb, fp->bufsize);
if (!skb) break; if (!skb) break;
ne = kmalloc (sizeof (struct FS_BPENTRY), gfp_flags); ne = kmalloc (sizeof (struct FS_BPENTRY), gfp_flags);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-d: %p(%d)\n", ne, sizeof (struct FS_BPENTRY)); fs_dprintk (FS_DEBUG_ALLOC, "Alloc rec-d: %p(%Zd)\n", ne, sizeof (struct FS_BPENTRY));
if (!ne) { if (!ne) {
fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p\n", skb); fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p\n", skb);
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
...@@ -1792,7 +1792,7 @@ static int __init fs_init (struct fs_dev *dev) ...@@ -1792,7 +1792,7 @@ static int __init fs_init (struct fs_dev *dev)
} }
dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *), dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
GFP_KERNEL); GFP_KERNEL);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%d)\n", fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%Zd)\n",
dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *)); dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *));
if (!dev->atm_vccs) { if (!dev->atm_vccs) {
...@@ -1900,7 +1900,7 @@ static int __init firestream_init_one (struct pci_dev *pci_dev, ...@@ -1900,7 +1900,7 @@ static int __init firestream_init_one (struct pci_dev *pci_dev,
goto err_out; goto err_out;
fs_dev = kmalloc (sizeof (struct fs_dev), GFP_KERNEL); fs_dev = kmalloc (sizeof (struct fs_dev), GFP_KERNEL);
fs_dprintk (FS_DEBUG_ALLOC, "Alloc fs-dev: %p(%d)\n", fs_dprintk (FS_DEBUG_ALLOC, "Alloc fs-dev: %p(%Zd)\n",
fs_dev, sizeof (struct fs_dev)); fs_dev, sizeof (struct fs_dev));
if (!fs_dev) if (!fs_dev)
goto err_out; goto err_out;
......
...@@ -182,9 +182,9 @@ static ssize_t maxframe = 4096; ...@@ -182,9 +182,9 @@ static ssize_t maxframe = 4096;
/* TTY callbacks */ /* TTY callbacks */
static int n_hdlc_tty_read(struct tty_struct *tty, struct file *file, static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
__u8 *buf, size_t nr); __u8 *buf, size_t nr);
static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file, static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
const __u8 *buf, size_t nr); const __u8 *buf, size_t nr);
static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file, static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
...@@ -572,7 +572,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data, ...@@ -572,7 +572,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
* *
* Returns the number of bytes returned or error code. * Returns the number of bytes returned or error code.
*/ */
static int n_hdlc_tty_read(struct tty_struct *tty, struct file *file, static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
__u8 *buf, size_t nr) __u8 *buf, size_t nr)
{ {
struct n_hdlc *n_hdlc = tty2n_hdlc(tty); struct n_hdlc *n_hdlc = tty2n_hdlc(tty);
...@@ -649,7 +649,7 @@ static int n_hdlc_tty_read(struct tty_struct *tty, struct file *file, ...@@ -649,7 +649,7 @@ static int n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
* *
* Returns the number of bytes written (or error code). * Returns the number of bytes written (or error code).
*/ */
static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file, static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
const __u8 *data, size_t count) const __u8 *data, size_t count)
{ {
struct n_hdlc *n_hdlc = tty2n_hdlc (tty); struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
...@@ -658,7 +658,7 @@ static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file, ...@@ -658,7 +658,7 @@ static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
struct n_hdlc_buf *tbuf; struct n_hdlc_buf *tbuf;
if (debuglevel >= DEBUG_LEVEL_INFO) if (debuglevel >= DEBUG_LEVEL_INFO)
printk("%s(%d)n_hdlc_tty_write() called count=%d\n", printk("%s(%d)n_hdlc_tty_write() called count=%Zd\n",
__FILE__,__LINE__,count); __FILE__,__LINE__,count);
/* Verify pointers */ /* Verify pointers */
...@@ -673,7 +673,7 @@ static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file, ...@@ -673,7 +673,7 @@ static int n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
if (debuglevel & DEBUG_LEVEL_INFO) if (debuglevel & DEBUG_LEVEL_INFO)
printk (KERN_WARNING printk (KERN_WARNING
"n_hdlc_tty_write: truncating user packet " "n_hdlc_tty_write: truncating user packet "
"from %lu to %d\n", (unsigned long) count, "from %lu to %Zd\n", (unsigned long) count,
maxframe ); maxframe );
count = maxframe; count = maxframe;
} }
......
...@@ -171,7 +171,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistp) ...@@ -171,7 +171,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistp)
return NULL; return NULL;
fail: fail:
printk(KERN_WARNING "vxfs: unable to read inode %ld\n", ino); printk(KERN_WARNING "vxfs: unable to read inode %ld\n", (unsigned long)ino);
vxfs_put_page(pp); vxfs_put_page(pp);
return NULL; return NULL;
} }
......
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