Skip to content

Commit

Permalink
net: hsr: fix placement of logical operator in a multi-line statement
Browse files Browse the repository at this point in the history
In a multi-line statement exceeding 80 characters, logical operator
should be at the end of a line instead of being at the start. This
is seen when ran checkpatch.pl -f on files under net/hsr. The change
is per suggestion from checkpatch.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Murali Karicheri authored and davem330 committed Apr 7, 2019
1 parent 5fa9677 commit 0594778
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions net/hsr/hsr_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
return false;

/* Correct ether type?. */
if (!(ethHdr->h_proto == htons(ETH_P_PRP)
|| ethHdr->h_proto == htons(ETH_P_HSR)))
if (!(ethHdr->h_proto == htons(ETH_P_PRP) ||
ethHdr->h_proto == htons(ETH_P_HSR)))
return false;

/* Get the supervision header from correct location. */
Expand Down Expand Up @@ -327,8 +327,8 @@ static int hsr_fill_frame_info(struct hsr_frame_info *frame,
/* FIXME: */
WARN_ONCE(1, "HSR: VLAN not yet supported");
}
if (ethhdr->h_proto == htons(ETH_P_PRP)
|| ethhdr->h_proto == htons(ETH_P_HSR)) {
if (ethhdr->h_proto == htons(ETH_P_PRP) ||
ethhdr->h_proto == htons(ETH_P_HSR)) {
frame->skb_std = NULL;
frame->skb_hsr = skb;
frame->sequence_nr = hsr_get_skb_sequence_nr(skb);
Expand Down
4 changes: 2 additions & 2 deletions net/hsr/hsr_framereg.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,

/* Everyone may create a node entry, connected node to a HSR device. */

if (ethhdr->h_proto == htons(ETH_P_PRP)
|| ethhdr->h_proto == htons(ETH_P_HSR)) {
if (ethhdr->h_proto == htons(ETH_P_PRP) ||
ethhdr->h_proto == htons(ETH_P_HSR)) {
/* Use the existing sequence_nr from the tag as starting point
* for filtering duplicate frames.
*/
Expand Down

0 comments on commit 0594778

Please sign in to comment.