summaryrefslogtreecommitdiffstats
path: root/net/hsr
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2019-04-05 13:31:29 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-06 21:32:21 -0400
commit5fa9677803643f96f8eb76d2aff7966b26078187 (patch)
treecf827cb33b2bbba838b9362064cf3ad1002a9180 /net/hsr
parent05ca6e644dc9b733379009137ba4cc7afce2256d (diff)
net: hsr: remove unnecessary space after a cast
This patch removes unnecessary space after a cast. This is seen when ran checkpatch.pl -f on files under net/hsr. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr')
-rw-r--r--net/hsr/hsr_forward.c10
-rw-r--r--net/hsr/hsr_framereg.c10
-rw-r--r--net/hsr/hsr_main.h10
3 files changed, 15 insertions, 15 deletions
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index 68ca775d3be8..71ffbfd6d740 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -53,7 +53,7 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
53 struct hsrv1_ethhdr_sp *hsrV1Hdr; 53 struct hsrv1_ethhdr_sp *hsrV1Hdr;
54 54
55 WARN_ON_ONCE(!skb_mac_header_was_set(skb)); 55 WARN_ON_ONCE(!skb_mac_header_was_set(skb));
56 ethHdr = (struct ethhdr *) skb_mac_header(skb); 56 ethHdr = (struct ethhdr *)skb_mac_header(skb);
57 57
58 /* Correct addr? */ 58 /* Correct addr? */
59 if (!ether_addr_equal(ethHdr->h_dest, 59 if (!ether_addr_equal(ethHdr->h_dest,
@@ -67,14 +67,14 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
67 67
68 /* Get the supervision header from correct location. */ 68 /* Get the supervision header from correct location. */
69 if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */ 69 if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */
70 hsrV1Hdr = (struct hsrv1_ethhdr_sp *) skb_mac_header(skb); 70 hsrV1Hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb);
71 if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP)) 71 if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP))
72 return false; 72 return false;
73 73
74 hsrSupTag = &hsrV1Hdr->hsr_sup; 74 hsrSupTag = &hsrV1Hdr->hsr_sup;
75 } else { 75 } else {
76 hsrSupTag = 76 hsrSupTag =
77 &((struct hsrv0_ethhdr_sp *) skb_mac_header(skb))->hsr_sup; 77 &((struct hsrv0_ethhdr_sp *)skb_mac_header(skb))->hsr_sup;
78 } 78 }
79 79
80 if (hsrSupTag->HSR_TLV_Type != HSR_TLV_ANNOUNCE && 80 if (hsrSupTag->HSR_TLV_Type != HSR_TLV_ANNOUNCE &&
@@ -140,7 +140,7 @@ static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame,
140 if (frame->is_vlan) 140 if (frame->is_vlan)
141 lsdu_size -= 4; 141 lsdu_size -= 4;
142 142
143 hsr_ethhdr = (struct hsr_ethhdr *) skb_mac_header(skb); 143 hsr_ethhdr = (struct hsr_ethhdr *)skb_mac_header(skb);
144 144
145 set_hsr_tag_path(&hsr_ethhdr->hsr_tag, lane_id); 145 set_hsr_tag_path(&hsr_ethhdr->hsr_tag, lane_id);
146 set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size); 146 set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size);
@@ -320,7 +320,7 @@ static int hsr_fill_frame_info(struct hsr_frame_info *frame,
320 if (!frame->node_src) 320 if (!frame->node_src)
321 return -1; /* Unknown node and !is_supervision, or no mem */ 321 return -1; /* Unknown node and !is_supervision, or no mem */
322 322
323 ethhdr = (struct ethhdr *) skb_mac_header(skb); 323 ethhdr = (struct ethhdr *)skb_mac_header(skb);
324 frame->is_vlan = false; 324 frame->is_vlan = false;
325 if (ethhdr->h_proto == htons(ETH_P_8021Q)) { 325 if (ethhdr->h_proto == htons(ETH_P_8021Q)) {
326 frame->is_vlan = true; 326 frame->is_vlan = true;
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index c1b0e62af0f1..1929a8dfd292 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -44,10 +44,10 @@ static bool seq_nr_after(u16 a, u16 b)
44 /* Remove inconsistency where 44 /* Remove inconsistency where
45 * seq_nr_after(a, b) == seq_nr_before(a, b) 45 * seq_nr_after(a, b) == seq_nr_before(a, b)
46 */ 46 */
47 if ((int) b - a == 32768) 47 if ((int)b - a == 32768)
48 return false; 48 return false;
49 49
50 return (((s16) (b - a)) < 0); 50 return (((s16)(b - a)) < 0);
51} 51}
52#define seq_nr_before(a, b) seq_nr_after((b), (a)) 52#define seq_nr_before(a, b) seq_nr_after((b), (a))
53#define seq_nr_after_or_eq(a, b) (!seq_nr_before((a), (b))) 53#define seq_nr_after_or_eq(a, b) (!seq_nr_before((a), (b)))
@@ -176,7 +176,7 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,
176 if (!skb_mac_header_was_set(skb)) 176 if (!skb_mac_header_was_set(skb))
177 return NULL; 177 return NULL;
178 178
179 ethhdr = (struct ethhdr *) skb_mac_header(skb); 179 ethhdr = (struct ethhdr *)skb_mac_header(skb);
180 180
181 list_for_each_entry_rcu(node, node_db, mac_list) { 181 list_for_each_entry_rcu(node, node_db, mac_list) {
182 if (ether_addr_equal(node->MacAddressA, ethhdr->h_source)) 182 if (ether_addr_equal(node->MacAddressA, ethhdr->h_source))
@@ -218,7 +218,7 @@ void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr,
218 struct list_head *node_db; 218 struct list_head *node_db;
219 int i; 219 int i;
220 220
221 ethhdr = (struct ethhdr *) skb_mac_header(skb); 221 ethhdr = (struct ethhdr *)skb_mac_header(skb);
222 222
223 /* Leave the ethernet header. */ 223 /* Leave the ethernet header. */
224 skb_pull(skb, sizeof(struct ethhdr)); 224 skb_pull(skb, sizeof(struct ethhdr));
@@ -230,7 +230,7 @@ void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr,
230 /* And leave the HSR sup tag. */ 230 /* And leave the HSR sup tag. */
231 skb_pull(skb, sizeof(struct hsr_sup_tag)); 231 skb_pull(skb, sizeof(struct hsr_sup_tag));
232 232
233 hsr_sp = (struct hsr_sup_payload *) skb->data; 233 hsr_sp = (struct hsr_sup_payload *)skb->data;
234 234
235 /* Merge node_curr (registered on MacAddressB) into node_real */ 235 /* Merge node_curr (registered on MacAddressB) into node_real */
236 node_db = &port_rcv->hsr->node_db; 236 node_db = &port_rcv->hsr->node_db;
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index 1b640731d705..5d28a5371765 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -109,22 +109,22 @@ struct hsr_sup_payload {
109 109
110static inline u16 get_hsr_stag_path(struct hsr_sup_tag *hst) 110static inline u16 get_hsr_stag_path(struct hsr_sup_tag *hst)
111{ 111{
112 return get_hsr_tag_path((struct hsr_tag *) hst); 112 return get_hsr_tag_path((struct hsr_tag *)hst);
113} 113}
114 114
115static inline u16 get_hsr_stag_HSR_ver(struct hsr_sup_tag *hst) 115static inline u16 get_hsr_stag_HSR_ver(struct hsr_sup_tag *hst)
116{ 116{
117 return get_hsr_tag_LSDU_size((struct hsr_tag *) hst); 117 return get_hsr_tag_LSDU_size((struct hsr_tag *)hst);
118} 118}
119 119
120static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path) 120static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path)
121{ 121{
122 set_hsr_tag_path((struct hsr_tag *) hst, path); 122 set_hsr_tag_path((struct hsr_tag *)hst, path);
123} 123}
124 124
125static inline void set_hsr_stag_HSR_Ver(struct hsr_sup_tag *hst, u16 HSR_Ver) 125static inline void set_hsr_stag_HSR_Ver(struct hsr_sup_tag *hst, u16 HSR_Ver)
126{ 126{
127 set_hsr_tag_LSDU_size((struct hsr_tag *) hst, HSR_Ver); 127 set_hsr_tag_LSDU_size((struct hsr_tag *)hst, HSR_Ver);
128} 128}
129 129
130struct hsrv0_ethhdr_sp { 130struct hsrv0_ethhdr_sp {
@@ -179,7 +179,7 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
179{ 179{
180 struct hsr_ethhdr *hsr_ethhdr; 180 struct hsr_ethhdr *hsr_ethhdr;
181 181
182 hsr_ethhdr = (struct hsr_ethhdr *) skb_mac_header(skb); 182 hsr_ethhdr = (struct hsr_ethhdr *)skb_mac_header(skb);
183 return ntohs(hsr_ethhdr->hsr_tag.sequence_nr); 183 return ntohs(hsr_ethhdr->hsr_tag.sequence_nr);
184} 184}
185 185