Commit 2e47eece authored by Yu Zhe's avatar Yu Zhe Committed by David S. Miller

ipv4: remove unnecessary type castings

remove unnecessary void* type castings.
Signed-off-by: default avatarYu Zhe <yuzhe@nfschina.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36ffca1a
...@@ -1384,7 +1384,7 @@ static void nl_fib_input(struct sk_buff *skb) ...@@ -1384,7 +1384,7 @@ static void nl_fib_input(struct sk_buff *skb)
return; return;
nlh = nlmsg_hdr(skb); nlh = nlmsg_hdr(skb);
frn = (struct fib_result_nl *) nlmsg_data(nlh); frn = nlmsg_data(nlh);
nl_fib_lookup(net, frn); nl_fib_lookup(net, frn);
portid = NETLINK_CB(skb).portid; /* netlink portid */ portid = NETLINK_CB(skb).portid; /* netlink portid */
...@@ -1425,7 +1425,7 @@ static void fib_disable_ip(struct net_device *dev, unsigned long event, ...@@ -1425,7 +1425,7 @@ static void fib_disable_ip(struct net_device *dev, unsigned long event,
static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr)
{ {
struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; struct in_ifaddr *ifa = ptr;
struct net_device *dev = ifa->ifa_dev->dev; struct net_device *dev = ifa->ifa_dev->dev;
struct net *net = dev_net(dev); struct net *net = dev_net(dev);
......
...@@ -145,7 +145,7 @@ INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule, ...@@ -145,7 +145,7 @@ INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule,
int flags, int flags,
struct fib_lookup_arg *arg) struct fib_lookup_arg *arg)
{ {
struct fib_result *result = (struct fib_result *) arg->result; struct fib_result *result = arg->result;
struct net_device *dev = NULL; struct net_device *dev = NULL;
if (result->fi) { if (result->fi) {
......
...@@ -2625,7 +2625,7 @@ static void fib_table_print(struct seq_file *seq, struct fib_table *tb) ...@@ -2625,7 +2625,7 @@ static void fib_table_print(struct seq_file *seq, struct fib_table *tb)
static int fib_triestat_seq_show(struct seq_file *seq, void *v) static int fib_triestat_seq_show(struct seq_file *seq, void *v)
{ {
struct net *net = (struct net *)seq->private; struct net *net = seq->private;
unsigned int h; unsigned int h;
seq_printf(seq, seq_printf(seq,
......
...@@ -342,7 +342,7 @@ void icmp_out_count(struct net *net, unsigned char type) ...@@ -342,7 +342,7 @@ void icmp_out_count(struct net *net, unsigned char type)
static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd, static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct icmp_bxm *icmp_param = (struct icmp_bxm *)from; struct icmp_bxm *icmp_param = from;
__wsum csum; __wsum csum;
csum = skb_copy_and_csum_bits(icmp_param->skb, csum = skb_copy_and_csum_bits(icmp_param->skb,
......
...@@ -2836,7 +2836,7 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v) ...@@ -2836,7 +2836,7 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v)
seq_puts(seq, seq_puts(seq,
"Idx\tDevice : Count Querier\tGroup Users Timer\tReporter\n"); "Idx\tDevice : Count Querier\tGroup Users Timer\tReporter\n");
else { else {
struct ip_mc_list *im = (struct ip_mc_list *)v; struct ip_mc_list *im = v;
struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq); struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq);
char *querier; char *querier;
long delta; long delta;
...@@ -2980,7 +2980,7 @@ static void igmp_mcf_seq_stop(struct seq_file *seq, void *v) ...@@ -2980,7 +2980,7 @@ static void igmp_mcf_seq_stop(struct seq_file *seq, void *v)
static int igmp_mcf_seq_show(struct seq_file *seq, void *v) static int igmp_mcf_seq_show(struct seq_file *seq, void *v)
{ {
struct ip_sf_list *psf = (struct ip_sf_list *)v; struct ip_sf_list *psf = v;
struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq); struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq);
if (v == SEQ_START_TOKEN) { if (v == SEQ_START_TOKEN) {
......
...@@ -510,7 +510,7 @@ EXPORT_SYMBOL(inet_frag_reasm_prepare); ...@@ -510,7 +510,7 @@ EXPORT_SYMBOL(inet_frag_reasm_prepare);
void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head, void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head,
void *reasm_data, bool try_coalesce) void *reasm_data, bool try_coalesce)
{ {
struct sk_buff **nextp = (struct sk_buff **)reasm_data; struct sk_buff **nextp = reasm_data;
struct rb_node *rbn; struct rb_node *rbn;
struct sk_buff *fp; struct sk_buff *fp;
int sum_truesize; int sum_truesize;
......
...@@ -356,7 +356,7 @@ static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg, ...@@ -356,7 +356,7 @@ static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg,
const void *ptr) const void *ptr)
{ {
const struct mfc_cache_cmp_arg *cmparg = arg->key; const struct mfc_cache_cmp_arg *cmparg = arg->key;
struct mfc_cache *c = (struct mfc_cache *)ptr; const struct mfc_cache *c = ptr;
return cmparg->mfc_mcastgrp != c->mfc_mcastgrp || return cmparg->mfc_mcastgrp != c->mfc_mcastgrp ||
cmparg->mfc_origin != c->mfc_origin; cmparg->mfc_origin != c->mfc_origin;
......
...@@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(ping_err); ...@@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(ping_err);
int ping_getfrag(void *from, char *to, int ping_getfrag(void *from, char *to,
int offset, int fraglen, int odd, struct sk_buff *skb) int offset, int fraglen, int odd, struct sk_buff *skb)
{ {
struct pingfakehdr *pfh = (struct pingfakehdr *)from; struct pingfakehdr *pfh = from;
if (offset == 0) { if (offset == 0) {
fraglen -= sizeof(struct icmphdr); fraglen -= sizeof(struct icmphdr);
......
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