diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2019-04-05 13:31:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-06 21:32:21 -0400 |
commit | b1b4aa914080286aa82d4e629d1a646738f2f94c (patch) | |
tree | d4c773437cb0bb9af68eb88cf7a83601f0276917 /net/hsr/hsr_forward.c | |
parent | d131fcc690b9f204581ed14581f5c7f2347cb140 (diff) |
net: hsr: remove camel case usage in the code
Current driver code uses camel case in many places. This is
seen when ran checkpatch.pl -f on files under net/hsr. This
patch fixes the code to remove camel case usage.
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 | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 43f91651ba10..602029c44050 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c | |||
@@ -48,40 +48,40 @@ struct hsr_frame_info { | |||
48 | */ | 48 | */ |
49 | static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb) | 49 | static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb) |
50 | { | 50 | { |
51 | struct ethhdr *ethHdr; | 51 | struct ethhdr *eth_hdr; |
52 | struct hsr_sup_tag *hsrSupTag; | 52 | struct hsr_sup_tag *hsr_sup_tag; |
53 | struct hsrv1_ethhdr_sp *hsrV1Hdr; | 53 | struct hsrv1_ethhdr_sp *hsr_V1_hdr; |
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 | eth_hdr = (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(eth_hdr->h_dest, |
60 | hsr->sup_multicast_addr)) | 60 | hsr->sup_multicast_addr)) |
61 | return false; | 61 | return false; |
62 | 62 | ||
63 | /* Correct ether type?. */ | 63 | /* Correct ether type?. */ |
64 | if (!(ethHdr->h_proto == htons(ETH_P_PRP) || | 64 | if (!(eth_hdr->h_proto == htons(ETH_P_PRP) || |
65 | ethHdr->h_proto == htons(ETH_P_HSR))) | 65 | eth_hdr->h_proto == htons(ETH_P_HSR))) |
66 | return false; | 66 | return false; |
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 (eth_hdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */ |
70 | hsrV1Hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb); | 70 | hsr_V1_hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb); |
71 | if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP)) | 71 | if (hsr_V1_hdr->hsr.encap_proto != htons(ETH_P_PRP)) |
72 | return false; | 72 | return false; |
73 | 73 | ||
74 | hsrSupTag = &hsrV1Hdr->hsr_sup; | 74 | hsr_sup_tag = &hsr_V1_hdr->hsr_sup; |
75 | } else { | 75 | } else { |
76 | hsrSupTag = | 76 | hsr_sup_tag = |
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 (hsr_sup_tag->HSR_TLV_type != HSR_TLV_ANNOUNCE && |
81 | hsrSupTag->HSR_TLV_Type != HSR_TLV_LIFE_CHECK) | 81 | hsr_sup_tag->HSR_TLV_type != HSR_TLV_LIFE_CHECK) |
82 | return false; | 82 | return false; |
83 | if (hsrSupTag->HSR_TLV_Length != 12 && | 83 | if (hsr_sup_tag->HSR_TLV_length != 12 && |
84 | hsrSupTag->HSR_TLV_Length != sizeof(struct hsr_sup_payload)) | 84 | hsr_sup_tag->HSR_TLV_length != sizeof(struct hsr_sup_payload)) |
85 | return false; | 85 | return false; |
86 | 86 | ||
87 | return true; | 87 | return true; |
@@ -125,7 +125,7 @@ static struct sk_buff *frame_get_stripped_skb(struct hsr_frame_info *frame, | |||
125 | } | 125 | } |
126 | 126 | ||
127 | static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame, | 127 | static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame, |
128 | struct hsr_port *port, u8 protoVersion) | 128 | struct hsr_port *port, u8 proto_version) |
129 | { | 129 | { |
130 | struct hsr_ethhdr *hsr_ethhdr; | 130 | struct hsr_ethhdr *hsr_ethhdr; |
131 | int lane_id; | 131 | int lane_id; |
@@ -146,7 +146,7 @@ static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame, | |||
146 | set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size); | 146 | set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size); |
147 | hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr); | 147 | hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr); |
148 | hsr_ethhdr->hsr_tag.encap_proto = hsr_ethhdr->ethhdr.h_proto; | 148 | hsr_ethhdr->hsr_tag.encap_proto = hsr_ethhdr->ethhdr.h_proto; |
149 | hsr_ethhdr->ethhdr.h_proto = htons(protoVersion ? | 149 | hsr_ethhdr->ethhdr.h_proto = htons(proto_version ? |
150 | ETH_P_HSR : ETH_P_PRP); | 150 | ETH_P_HSR : ETH_P_PRP); |
151 | } | 151 | } |
152 | 152 | ||
@@ -176,7 +176,7 @@ static struct sk_buff *create_tagged_skb(struct sk_buff *skb_o, | |||
176 | memmove(dst, src, movelen); | 176 | memmove(dst, src, movelen); |
177 | skb_reset_mac_header(skb); | 177 | skb_reset_mac_header(skb); |
178 | 178 | ||
179 | hsr_fill_tag(skb, frame, port, port->hsr->protVersion); | 179 | hsr_fill_tag(skb, frame, port, port->hsr->prot_version); |
180 | 180 | ||
181 | return skb; | 181 | return skb; |
182 | } | 182 | } |