diff mbox series

net: openswitch: flow_netlink.c: Fix indentation errors

Message ID 20210503181706.vd5onvgptqd7squ2@kewl-virtual-machine (mailing list archive)
State Deferred
Delegated to: Netdev Maintainers
Headers show
Series net: openswitch: flow_netlink.c: Fix indentation errors | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch warning WARNING: line length of 85 exceeds 80 columns
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Shubhankar Kuranagatti May 3, 2021, 6:17 p.m. UTC
Every subsequent line starts with a * of block comment
The closing */ is shifted to a new line
New line added after declaration
The repeasted word 'is' is omitted from comment block
This is done to maintain code uniformity

Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@gmail.com>
---
 net/openvswitch/flow_netlink.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

Comments

David Miller May 3, 2021, 8:47 p.m. UTC | #1
From: Shubhankar Kuranagatti <shubhankarvk@gmail.com>
Date: Mon, 3 May 2021 23:47:06 +0530

> Every subsequent line starts with a * of block comment
> The closing */ is shifted to a new line
> New line added after declaration
> The repeasted word 'is' is omitted from comment block
> This is done to maintain code uniformity
> 
> Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@gmail.com>
Please resubmit this when net-next opens back up.

Thank you.
diff mbox series

Patch

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index fd1f809e9bc1..b774d93860ab 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -156,7 +156,8 @@  static bool match_validate(const struct sw_flow_match *match,
 	u64 mask_allowed = key_attrs;  /* At most allow all key attributes */
 
 	/* The following mask attributes allowed only if they
-	 * pass the validation tests. */
+	 * pass the validation tests.
+	 */
 	mask_allowed &= ~((1 << OVS_KEY_ATTR_IPV4)
 			| (1 << OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4)
 			| (1 << OVS_KEY_ATTR_IPV6)
@@ -2019,6 +2020,7 @@  static int __ovs_nla_put_key(const struct sw_flow_key *swkey,
 				goto nla_put_failure;
 	} else {
 		u16 upper_u16;
+
 		upper_u16 = !is_mask ? 0 : 0xffff;
 
 		if (nla_put_u32(skb, OVS_KEY_ATTR_IN_PORT,
@@ -2060,11 +2062,11 @@  static int __ovs_nla_put_key(const struct sw_flow_key *swkey,
 
 		if (swkey->eth.type == htons(ETH_P_802_2)) {
 			/*
-			* Ethertype 802.2 is represented in the netlink with omitted
-			* OVS_KEY_ATTR_ETHERTYPE in the flow key attribute, and
-			* 0xffff in the mask attribute.  Ethertype can also
-			* be wildcarded.
-			*/
+			 * Ethertype 802.2 is represented in the netlink with omitted
+			 * OVS_KEY_ATTR_ETHERTYPE in the flow key attribute, and
+			 * 0xffff in the mask attribute.  Ethertype can also
+			 * be wildcarded.
+			 */
 			if (is_mask && output->eth.type)
 				if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE,
 							output->eth.type))
@@ -2329,7 +2331,8 @@  static void __ovs_nla_free_flow_actions(struct rcu_head *head)
 }
 
 /* Schedules 'sf_acts' to be freed after the next RCU grace period.
- * The caller must hold rcu_read_lock for this to be sensible. */
+ * The caller must hold rcu_read_lock for this to be sensible.
+ */
 void ovs_nla_free_flow_actions_rcu(struct sw_flow_actions *sf_acts)
 {
 	call_rcu(&sf_acts->rcu, __ovs_nla_free_flow_actions);
@@ -2446,6 +2449,7 @@  static int validate_and_copy_sample(struct net *net, const struct nlattr *attr,
 	memset(attrs, 0, sizeof(attrs));
 	nla_for_each_nested(a, attr, rem) {
 		int type = nla_type(a);
+
 		if (!type || type > OVS_SAMPLE_ATTR_MAX || attrs[type])
 			return -EINVAL;
 		attrs[type] = a;
@@ -3184,13 +3188,14 @@  static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
 
 		case OVS_ACTION_ATTR_POP_MPLS: {
 			__be16  proto;
+
 			if (vlan_tci & htons(VLAN_CFI_MASK) ||
 			    !eth_p_mpls(eth_type))
 				return -EINVAL;
 
 			/* Disallow subsequent L2.5+ set actions and mpls_pop
 			 * actions once the last MPLS label in the packet is
-			 * is popped as there is no check here to ensure that
+			 * popped as there is no check here to ensure that
 			 * the new eth type is valid and thus set actions could
 			 * write off the end of the packet or otherwise corrupt
 			 * it.
@@ -3255,7 +3260,8 @@  static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
 
 		case OVS_ACTION_ATTR_PUSH_ETH:
 			/* Disallow pushing an Ethernet header if one
-			 * is already present */
+			 * is already present
+			 */
 			if (mac_proto != MAC_PROTO_NONE)
 				return -EINVAL;
 			mac_proto = MAC_PROTO_ETHERNET;