Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 647c0c70 authored by Eldad Zack's avatar Eldad Zack Committed by David S. Miller
Browse files

net/ipv6/af_inet6.c: checkpatch cleanup



af_inet6.c:80: ERROR: do not initialise statics to 0 or NULL
af_inet6.c:259: ERROR: spaces required around that '=' (ctx:VxV)
af_inet6.c:394: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:412: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:422: ERROR: do not use assignment in if condition
af_inet6.c:425: ERROR: do not use assignment in if condition
af_inet6.c:433: ERROR: do not use assignment in if condition
af_inet6.c:437: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:446: ERROR: spaces required around that '=' (ctx:VxV)
af_inet6.c:478: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:485: ERROR: that open brace { should be on the previous line
af_inet6.c:485: ERROR: space required before the open parenthesis '('
af_inet6.c:513: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:629: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:647: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:687: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:709: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
af_inet6.c:1073: ERROR: space required before the open parenthesis '('

Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b943fbb0
Loading
Loading
Loading
Loading
+11 −18
Original line number Original line Diff line number Diff line
@@ -77,7 +77,7 @@ struct ipv6_params ipv6_defaults = {
	.autoconf = 1,
	.autoconf = 1,
};
};


static int disable_ipv6_mod = 0;
static int disable_ipv6_mod;


module_param_named(disable, disable_ipv6_mod, int, 0444);
module_param_named(disable, disable_ipv6_mod, int, 0444);
MODULE_PARM_DESC(disable, "Disable IPv6 module such that it is non-functional");
MODULE_PARM_DESC(disable, "Disable IPv6 module such that it is non-functional");
@@ -390,7 +390,6 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
	rcu_read_unlock();
	rcu_read_unlock();
	goto out;
	goto out;
}
}

EXPORT_SYMBOL(inet6_bind);
EXPORT_SYMBOL(inet6_bind);


int inet6_release(struct socket *sock)
int inet6_release(struct socket *sock)
@@ -408,7 +407,6 @@ int inet6_release(struct socket *sock)


	return inet_release(sock);
	return inet_release(sock);
}
}

EXPORT_SYMBOL(inet6_release);
EXPORT_SYMBOL(inet6_release);


void inet6_destroy_sock(struct sock *sk)
void inet6_destroy_sock(struct sock *sk)
@@ -419,10 +417,12 @@ void inet6_destroy_sock(struct sock *sk)


	/* Release rx options */
	/* Release rx options */


	if ((skb = xchg(&np->pktoptions, NULL)) != NULL)
	skb = xchg(&np->pktoptions, NULL);
	if (skb != NULL)
		kfree_skb(skb);
		kfree_skb(skb);


	if ((skb = xchg(&np->rxpmtu, NULL)) != NULL)
	skb = xchg(&np->rxpmtu, NULL);
	if (skb != NULL)
		kfree_skb(skb);
		kfree_skb(skb);


	/* Free flowlabels */
	/* Free flowlabels */
@@ -430,10 +430,10 @@ void inet6_destroy_sock(struct sock *sk)


	/* Free tx options */
	/* Free tx options */


	if ((opt = xchg(&np->opt, NULL)) != NULL)
	opt = xchg(&np->opt, NULL);
	if (opt != NULL)
		sock_kfree_s(sk, opt, opt->tot_len);
		sock_kfree_s(sk, opt, opt->tot_len);
}
}

EXPORT_SYMBOL_GPL(inet6_destroy_sock);
EXPORT_SYMBOL_GPL(inet6_destroy_sock);


/*
/*
@@ -474,7 +474,6 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
	*uaddr_len = sizeof(*sin);
	*uaddr_len = sizeof(*sin);
	return 0;
	return 0;
}
}

EXPORT_SYMBOL(inet6_getname);
EXPORT_SYMBOL(inet6_getname);


int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
@@ -482,8 +481,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
	struct sock *sk = sock->sk;
	struct sock *sk = sock->sk;
	struct net *net = sock_net(sk);
	struct net *net = sock_net(sk);


	switch(cmd)
	switch (cmd) {
	{
	case SIOCGSTAMP:
	case SIOCGSTAMP:
		return sock_get_timestamp(sk, (struct timeval __user *)arg);
		return sock_get_timestamp(sk, (struct timeval __user *)arg);


@@ -509,7 +507,6 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
	/*NOTREACHED*/
	/*NOTREACHED*/
	return 0;
	return 0;
}
}

EXPORT_SYMBOL(inet6_ioctl);
EXPORT_SYMBOL(inet6_ioctl);


const struct proto_ops inet6_stream_ops = {
const struct proto_ops inet6_stream_ops = {
@@ -625,7 +622,6 @@ int inet6_register_protosw(struct inet_protosw *p)
	       p->type);
	       p->type);
	goto out;
	goto out;
}
}

EXPORT_SYMBOL(inet6_register_protosw);
EXPORT_SYMBOL(inet6_register_protosw);


void
void
@@ -643,7 +639,6 @@ inet6_unregister_protosw(struct inet_protosw *p)
		synchronize_net();
		synchronize_net();
	}
	}
}
}

EXPORT_SYMBOL(inet6_unregister_protosw);
EXPORT_SYMBOL(inet6_unregister_protosw);


int inet6_sk_rebuild_header(struct sock *sk)
int inet6_sk_rebuild_header(struct sock *sk)
@@ -683,7 +678,6 @@ int inet6_sk_rebuild_header(struct sock *sk)


	return 0;
	return 0;
}
}

EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header);
EXPORT_SYMBOL_GPL(inet6_sk_rebuild_header);


int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
@@ -705,7 +699,6 @@ int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
	}
	}
	return 0;
	return 0;
}
}

EXPORT_SYMBOL_GPL(ipv6_opt_accepted);
EXPORT_SYMBOL_GPL(ipv6_opt_accepted);


static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)