aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2014-04-28 17:55:32 -0600
committerSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2014-05-05 12:00:36 -0600
commit8b4f8900a089383caadfb222e1df55a7e9faba6c (patch)
tree5bd3cb4b52fed16161fb0a7767786c47ec9c209b /net/netfilter
parente589fedd938e9742c6268e89fcb50afe44290ba0 (diff)
downloadqcom-msm-v3.10-8b4f8900a089383caadfb222e1df55a7e9faba6c.tar.gz
net: netfilter: fix compilation warnings
Fix compilation warnings due to type casting between pointers and function pointers which are treated as errors when the configs CONFIG_NETFILTER_XT_MATCH_QTAGUID and CONFIG_NETFILTER_XT_MATCH_QUOTA2 are enabled CRs-fixed: 638281 Change-Id: Idce65bcaddc68cc58e42951c183a8fa78810f28f Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_qtaguid.c16
-rw-r--r--net/netfilter/xt_quota2.c8
2 files changed, 13 insertions, 11 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index b73e7e34620..dfdacb51a1d 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -594,8 +594,8 @@ 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,
- size_t size, loff_t *ppos)
+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));
char tmp[24];
@@ -605,8 +605,8 @@ 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,
- size_t size, loff_t *ppos)
+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));
char tmp[24];
@@ -1491,7 +1491,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 = (int)(long)PDE_DATA(inode);
return 0;
}
@@ -2482,8 +2482,10 @@ err:
}
#define MAX_QTAGUID_CTRL_INPUT_LEN 255
-static int qtaguid_ctrl_proc_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *offp)
+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];
diff --git a/net/netfilter/xt_quota2.c b/net/netfilter/xt_quota2.c
index 44ebdcc7596..9f10e1b2423 100644
--- a/net/netfilter/xt_quota2.c
+++ b/net/netfilter/xt_quota2.c
@@ -122,8 +122,8 @@ 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,
- size_t size, loff_t *ppos)
+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));
char tmp[24];
@@ -135,8 +135,8 @@ 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,
- size_t size, loff_t *ppos)
+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));
char buf[sizeof("18446744073709551616")];