Commit b71a61cc authored by Tom Parkin's avatar Tom Parkin Committed by David S. Miller
Browse files

l2tp: cleanup whitespace use



Fix up various whitespace issues as reported by checkpatch.pl:

 * remove spaces around operators where appropriate,
 * add missing blank lines following declarations,
 * remove multiple blank lines, or trailing blank lines at the end of
   functions.

Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 637989b5
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -134,7 +134,6 @@ static inline struct hlist_head *
l2tp_session_id_hash_2(struct l2tp_net *pn, u32 session_id)
{
	return &pn->l2tp_session_hlist[hash_32(session_id, L2TP_HASH_BITS_2)];

}

/* Session hash list.
@@ -777,6 +776,7 @@ EXPORT_SYMBOL(l2tp_recv_common);
static int l2tp_session_queue_purge(struct l2tp_session *session)
{
	struct sk_buff *skb = NULL;

	BUG_ON(!session);
	BUG_ON(session->magic != L2TP_SESSION_MAGIC);
	while ((skb = skb_dequeue(&session->reorder_q))) {
@@ -1593,6 +1593,7 @@ void __l2tp_session_unhash(struct l2tp_session *session)
		/* For L2TPv3 we have a per-net hash: remove from there, too */
		if (tunnel->version != L2TP_HDR_VER_2) {
			struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);

			spin_lock_bh(&pn->l2tp_session_hlist_lock);
			hlist_del_init_rcu(&session->global_hlist);
			spin_unlock_bh(&pn->l2tp_session_hlist_lock);
@@ -1636,7 +1637,6 @@ void l2tp_session_set_header_len(struct l2tp_session *session, int version)
		if (session->tunnel->encap == L2TP_ENCAPTYPE_UDP)
			session->hdr_len += 4;
	}

}
EXPORT_SYMBOL_GPL(l2tp_session_set_header_len);

+0 −2
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ static void l2tp_dfs_next_session(struct l2tp_dfs_seq_data *pd)
		pd->session_idx = 0;
		l2tp_dfs_next_tunnel(pd);
	}

}

static void *l2tp_dfs_seq_start(struct seq_file *m, loff_t *offs)
@@ -90,7 +89,6 @@ out:
	return pd;
}


static void *l2tp_dfs_seq_next(struct seq_file *m, void *v, loff_t *pos)
{
	(*pos)++;
+6 −10
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ struct l2tp_eth_sess {
	struct net_device __rcu *dev;
};


static int l2tp_eth_dev_init(struct net_device *dev)
{
	eth_hw_addr_random(dev);
@@ -100,7 +99,6 @@ static void l2tp_eth_get_stats64(struct net_device *dev,
	stats->rx_bytes   = (unsigned long)atomic_long_read(&priv->rx_bytes);
	stats->rx_packets = (unsigned long)atomic_long_read(&priv->rx_packets);
	stats->rx_errors  = (unsigned long)atomic_long_read(&priv->rx_errors);

}

static const struct net_device_ops l2tp_eth_netdev_ops = {
@@ -348,13 +346,11 @@ err:
	return rc;
}


static const struct l2tp_nl_cmd_ops l2tp_eth_nl_cmd_ops = {
	.session_create	= l2tp_eth_create,
	.session_delete	= l2tp_session_delete,
};


static int __init l2tp_eth_init(void)
{
	int err = 0;
+8 −6
Original line number Diff line number Diff line
@@ -375,6 +375,7 @@ static int l2tp_ip_getname(struct socket *sock, struct sockaddr *uaddr,
		lsa->l2tp_addr.s_addr = inet->inet_daddr;
	} else {
		__be32 addr = inet->inet_rcv_saddr;

		if (!addr)
			addr = inet->inet_saddr;
		lsa->l2tp_conn_id = lsk->conn_id;
@@ -422,6 +423,7 @@ static int l2tp_ip_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
	/* Get and verify the address. */
	if (msg->msg_name) {
		DECLARE_SOCKADDR(struct sockaddr_l2tpip *, lip, msg->msg_name);

		rc = -EINVAL;
		if (msg->msg_namelen < sizeof(*lip))
			goto out;
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@

#include "l2tp_core.h"


static struct genl_family l2tp_nl_family;

static const struct genl_multicast_group l2tp_multicast_group[] = {
@@ -570,6 +569,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf

		if (info->attrs[L2TP_ATTR_COOKIE]) {
			u16 len = nla_len(info->attrs[L2TP_ATTR_COOKIE]);

			if (len > 8) {
				ret = -EINVAL;
				goto out_tunnel;
@@ -579,6 +579,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
		}
		if (info->attrs[L2TP_ATTR_PEER_COOKIE]) {
			u16 len = nla_len(info->attrs[L2TP_ATTR_PEER_COOKIE]);

			if (len > 8) {
				ret = -EINVAL;
				goto out_tunnel;
Loading