diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2019-04-05 13:31:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-06 21:32:20 -0400 |
commit | 5670342ced28b87f598d97e49d27bd99b38c1665 (patch) | |
tree | fe104e0b2c79c3dda111abdb76fb574bfb174f02 /net/hsr/hsr_forward.c | |
parent | d4730775ed4ba91615f462415ab66f49431ee794 (diff) |
net: hsr: remove unnecessary paranthesis from the code
This patch fixes unnecessary paranthesis from the code. This is
seen when ran checkpatch.pl -f option 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/hsr_forward.c')
-rw-r--r-- | net/hsr/hsr_forward.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 70220e5a389a..fdc191015208 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c | |||
@@ -77,12 +77,11 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb) | |||
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 && |
81 | (hsrSupTag->HSR_TLV_Type != HSR_TLV_LIFE_CHECK)) | 81 | hsrSupTag->HSR_TLV_Type != HSR_TLV_LIFE_CHECK) |
82 | return false; | 82 | return false; |
83 | if ((hsrSupTag->HSR_TLV_Length != 12) && | 83 | if (hsrSupTag->HSR_TLV_Length != 12 && |
84 | (hsrSupTag->HSR_TLV_Length != | 84 | hsrSupTag->HSR_TLV_Length != sizeof(struct hsr_sup_payload)) |
85 | sizeof(struct hsr_sup_payload))) | ||
86 | return false; | 85 | return false; |
87 | 86 | ||
88 | return true; | 87 | return true; |
@@ -191,7 +190,7 @@ static struct sk_buff *frame_get_tagged_skb(struct hsr_frame_info *frame, | |||
191 | if (frame->skb_hsr) | 190 | if (frame->skb_hsr) |
192 | return skb_clone(frame->skb_hsr, GFP_ATOMIC); | 191 | return skb_clone(frame->skb_hsr, GFP_ATOMIC); |
193 | 192 | ||
194 | if ((port->type != HSR_PT_SLAVE_A) && (port->type != HSR_PT_SLAVE_B)) { | 193 | if (port->type != HSR_PT_SLAVE_A && port->type != HSR_PT_SLAVE_B) { |
195 | WARN_ONCE(1, "HSR: Bug: trying to create a tagged frame for a non-ring port"); | 194 | WARN_ONCE(1, "HSR: Bug: trying to create a tagged frame for a non-ring port"); |
196 | return NULL; | 195 | return NULL; |
197 | } | 196 | } |
@@ -255,11 +254,11 @@ static void hsr_forward_do(struct hsr_frame_info *frame) | |||
255 | continue; | 254 | continue; |
256 | 255 | ||
257 | /* Don't deliver locally unless we should */ | 256 | /* Don't deliver locally unless we should */ |
258 | if ((port->type == HSR_PT_MASTER) && !frame->is_local_dest) | 257 | if (port->type == HSR_PT_MASTER && !frame->is_local_dest) |
259 | continue; | 258 | continue; |
260 | 259 | ||
261 | /* Deliver frames directly addressed to us to master only */ | 260 | /* Deliver frames directly addressed to us to master only */ |
262 | if ((port->type != HSR_PT_MASTER) && frame->is_local_exclusive) | 261 | if (port->type != HSR_PT_MASTER && frame->is_local_exclusive) |
263 | continue; | 262 | continue; |
264 | 263 | ||
265 | /* Don't send frame over port where it has been sent before */ | 264 | /* Don't send frame over port where it has been sent before */ |
@@ -267,7 +266,7 @@ static void hsr_forward_do(struct hsr_frame_info *frame) | |||
267 | frame->sequence_nr)) | 266 | frame->sequence_nr)) |
268 | continue; | 267 | continue; |
269 | 268 | ||
270 | if (frame->is_supervision && (port->type == HSR_PT_MASTER)) { | 269 | if (frame->is_supervision && port->type == HSR_PT_MASTER) { |
271 | hsr_handle_sup_frame(frame->skb_hsr, | 270 | hsr_handle_sup_frame(frame->skb_hsr, |
272 | frame->node_src, | 271 | frame->node_src, |
273 | frame->port_rcv); | 272 | frame->port_rcv); |
@@ -301,9 +300,9 @@ static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb, | |||
301 | frame->is_local_exclusive = false; | 300 | frame->is_local_exclusive = false; |
302 | } | 301 | } |
303 | 302 | ||
304 | if ((skb->pkt_type == PACKET_HOST) || | 303 | if (skb->pkt_type == PACKET_HOST || |
305 | (skb->pkt_type == PACKET_MULTICAST) || | 304 | skb->pkt_type == PACKET_MULTICAST || |
306 | (skb->pkt_type == PACKET_BROADCAST)) { | 305 | skb->pkt_type == PACKET_BROADCAST) { |
307 | frame->is_local_dest = true; | 306 | frame->is_local_dest = true; |
308 | } else { | 307 | } else { |
309 | frame->is_local_dest = false; | 308 | frame->is_local_dest = false; |