netfilter: xt_qtaguid: 64-bit warning fixes
authorGreg Hackmann <ghackmann@google.com>
Mon, 24 Feb 2014 17:39:46 +0000 (09:39 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:51:31 +0000 (13:51 -0800)
Change-Id: I2adc517c0c51050ed601992fa0ea4de8f1449414
Signed-off-by: Greg Hackmann <ghackmann@google.com>
net/netfilter/xt_qtaguid.c
net/netfilter/xt_quota2.c

index 4a16829969a68b9560f0c63ff6ef175886683458..eee667987f7d70e0d9c30e5bad9febbb932e6095 100644 (file)
@@ -594,7 +594,7 @@ static void put_tag_ref_tree(tag_t full_tag, struct uid_tag_data *utd_entry)
        }
 }
 
-static int read_proc_u64(struct file *file, char __user *buf,
+static ssize_t read_proc_u64(struct file *file, char __user *buf,
                         size_t size, loff_t *ppos)
 {
        uint64_t *valuep = PDE_DATA(file_inode(file));
@@ -605,7 +605,7 @@ static int read_proc_u64(struct file *file, char __user *buf,
        return simple_read_from_buffer(buf, size, ppos, tmp, tmp_size);
 }
 
-static int read_proc_bool(struct file *file, char __user *buf,
+static ssize_t read_proc_bool(struct file *file, char __user *buf,
                          size_t size, loff_t *ppos)
 {
        bool *valuep = PDE_DATA(file_inode(file));
@@ -1488,7 +1488,7 @@ static int proc_iface_stat_fmt_open(struct inode *inode, struct file *file)
        if (!s)
                return -ENOMEM;
 
-       s->fmt = (int)PDE_DATA(inode);
+       s->fmt = (uintptr_t)PDE_DATA(inode);
        return 0;
 }
 
@@ -2440,10 +2440,10 @@ err:
        return res;
 }
 
-static int qtaguid_ctrl_parse(const char *input, int count)
+static ssize_t qtaguid_ctrl_parse(const char *input, size_t count)
 {
        char cmd;
-       int res;
+       ssize_t res;
 
        CT_DEBUG("qtaguid: ctrl(%s): pid=%u tgid=%u uid=%u\n",
                 input, current->pid, current->tgid, current_fsuid());
@@ -2474,12 +2474,12 @@ static int qtaguid_ctrl_parse(const char *input, int count)
        if (!res)
                res = count;
 err:
-       CT_DEBUG("qtaguid: ctrl(%s): res=%d\n", input, res);
+       CT_DEBUG("qtaguid: ctrl(%s): res=%zd\n", input, res);
        return res;
 }
 
 #define MAX_QTAGUID_CTRL_INPUT_LEN 255
-static int qtaguid_ctrl_proc_write(struct file *file, const char __user *buffer,
+static ssize_t qtaguid_ctrl_proc_write(struct file *file, const char __user *buffer,
                                   size_t count, loff_t *offp)
 {
        char input_buf[MAX_QTAGUID_CTRL_INPUT_LEN];
index 44ebdcc75965c75c32efe65cce03d7897f2d06e2..4328562572f670e6c314f442feb2d0fa575eae85 100644 (file)
@@ -122,7 +122,7 @@ static void quota2_log(unsigned int hooknum,
 }
 #endif  /* if+else CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG */
 
-static int quota_proc_read(struct file *file, char __user *buf,
+static ssize_t quota_proc_read(struct file *file, char __user *buf,
                           size_t size, loff_t *ppos)
 {
        struct xt_quota_counter *e = PDE_DATA(file_inode(file));
@@ -135,7 +135,7 @@ static int quota_proc_read(struct file *file, char __user *buf,
        return simple_read_from_buffer(buf, size, ppos, tmp, tmp_size);
 }
 
-static int quota_proc_write(struct file *file, const char __user *input,
+static ssize_t quota_proc_write(struct file *file, const char __user *input,
                             size_t size, loff_t *ppos)
 {
        struct xt_quota_counter *e = PDE_DATA(file_inode(file));