提交 5fa96778 编写于 作者: M Murali Karicheri 提交者: David S. Miller

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: NMurali Karicheri <m-karicheri2@ti.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 05ca6e64
...@@ -53,7 +53,7 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb) ...@@ -53,7 +53,7 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
struct hsrv1_ethhdr_sp *hsrV1Hdr; struct hsrv1_ethhdr_sp *hsrV1Hdr;
WARN_ON_ONCE(!skb_mac_header_was_set(skb)); WARN_ON_ONCE(!skb_mac_header_was_set(skb));
ethHdr = (struct ethhdr *) skb_mac_header(skb); ethHdr = (struct ethhdr *)skb_mac_header(skb);
/* Correct addr? */ /* Correct addr? */
if (!ether_addr_equal(ethHdr->h_dest, 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,14 +67,14 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
/* Get the supervision header from correct location. */ /* Get the supervision header from correct location. */
if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */ if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */
hsrV1Hdr = (struct hsrv1_ethhdr_sp *) skb_mac_header(skb); hsrV1Hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb);
if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP)) if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP))
return false; return false;
hsrSupTag = &hsrV1Hdr->hsr_sup; hsrSupTag = &hsrV1Hdr->hsr_sup;
} else { } else {
hsrSupTag = hsrSupTag =
&((struct hsrv0_ethhdr_sp *) skb_mac_header(skb))->hsr_sup; &((struct hsrv0_ethhdr_sp *)skb_mac_header(skb))->hsr_sup;
} }
if (hsrSupTag->HSR_TLV_Type != HSR_TLV_ANNOUNCE && 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,7 +140,7 @@ static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame,
if (frame->is_vlan) if (frame->is_vlan)
lsdu_size -= 4; lsdu_size -= 4;
hsr_ethhdr = (struct hsr_ethhdr *) skb_mac_header(skb); hsr_ethhdr = (struct hsr_ethhdr *)skb_mac_header(skb);
set_hsr_tag_path(&hsr_ethhdr->hsr_tag, lane_id); set_hsr_tag_path(&hsr_ethhdr->hsr_tag, lane_id);
set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size); 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,7 +320,7 @@ static int hsr_fill_frame_info(struct hsr_frame_info *frame,
if (!frame->node_src) if (!frame->node_src)
return -1; /* Unknown node and !is_supervision, or no mem */ return -1; /* Unknown node and !is_supervision, or no mem */
ethhdr = (struct ethhdr *) skb_mac_header(skb); ethhdr = (struct ethhdr *)skb_mac_header(skb);
frame->is_vlan = false; frame->is_vlan = false;
if (ethhdr->h_proto == htons(ETH_P_8021Q)) { if (ethhdr->h_proto == htons(ETH_P_8021Q)) {
frame->is_vlan = true; frame->is_vlan = true;
......
...@@ -44,10 +44,10 @@ static bool seq_nr_after(u16 a, u16 b) ...@@ -44,10 +44,10 @@ static bool seq_nr_after(u16 a, u16 b)
/* Remove inconsistency where /* Remove inconsistency where
* seq_nr_after(a, b) == seq_nr_before(a, b) * seq_nr_after(a, b) == seq_nr_before(a, b)
*/ */
if ((int) b - a == 32768) if ((int)b - a == 32768)
return false; return false;
return (((s16) (b - a)) < 0); return (((s16)(b - a)) < 0);
} }
#define seq_nr_before(a, b) seq_nr_after((b), (a)) #define seq_nr_before(a, b) seq_nr_after((b), (a))
#define seq_nr_after_or_eq(a, b) (!seq_nr_before((a), (b))) #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,7 +176,7 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,
if (!skb_mac_header_was_set(skb)) if (!skb_mac_header_was_set(skb))
return NULL; return NULL;
ethhdr = (struct ethhdr *) skb_mac_header(skb); ethhdr = (struct ethhdr *)skb_mac_header(skb);
list_for_each_entry_rcu(node, node_db, mac_list) { list_for_each_entry_rcu(node, node_db, mac_list) {
if (ether_addr_equal(node->MacAddressA, ethhdr->h_source)) 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,7 +218,7 @@ void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr,
struct list_head *node_db; struct list_head *node_db;
int i; int i;
ethhdr = (struct ethhdr *) skb_mac_header(skb); ethhdr = (struct ethhdr *)skb_mac_header(skb);
/* Leave the ethernet header. */ /* Leave the ethernet header. */
skb_pull(skb, sizeof(struct ethhdr)); 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,7 +230,7 @@ void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr,
/* And leave the HSR sup tag. */ /* And leave the HSR sup tag. */
skb_pull(skb, sizeof(struct hsr_sup_tag)); skb_pull(skb, sizeof(struct hsr_sup_tag));
hsr_sp = (struct hsr_sup_payload *) skb->data; hsr_sp = (struct hsr_sup_payload *)skb->data;
/* Merge node_curr (registered on MacAddressB) into node_real */ /* Merge node_curr (registered on MacAddressB) into node_real */
node_db = &port_rcv->hsr->node_db; node_db = &port_rcv->hsr->node_db;
......
...@@ -109,22 +109,22 @@ struct hsr_sup_payload { ...@@ -109,22 +109,22 @@ struct hsr_sup_payload {
static inline u16 get_hsr_stag_path(struct hsr_sup_tag *hst) static inline u16 get_hsr_stag_path(struct hsr_sup_tag *hst)
{ {
return get_hsr_tag_path((struct hsr_tag *) hst); return get_hsr_tag_path((struct hsr_tag *)hst);
} }
static inline u16 get_hsr_stag_HSR_ver(struct hsr_sup_tag *hst) static inline u16 get_hsr_stag_HSR_ver(struct hsr_sup_tag *hst)
{ {
return get_hsr_tag_LSDU_size((struct hsr_tag *) hst); return get_hsr_tag_LSDU_size((struct hsr_tag *)hst);
} }
static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path) static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path)
{ {
set_hsr_tag_path((struct hsr_tag *) hst, path); set_hsr_tag_path((struct hsr_tag *)hst, path);
} }
static inline void set_hsr_stag_HSR_Ver(struct hsr_sup_tag *hst, u16 HSR_Ver) static inline void set_hsr_stag_HSR_Ver(struct hsr_sup_tag *hst, u16 HSR_Ver)
{ {
set_hsr_tag_LSDU_size((struct hsr_tag *) hst, HSR_Ver); set_hsr_tag_LSDU_size((struct hsr_tag *)hst, HSR_Ver);
} }
struct hsrv0_ethhdr_sp { struct hsrv0_ethhdr_sp {
...@@ -179,7 +179,7 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb) ...@@ -179,7 +179,7 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
{ {
struct hsr_ethhdr *hsr_ethhdr; struct hsr_ethhdr *hsr_ethhdr;
hsr_ethhdr = (struct hsr_ethhdr *) skb_mac_header(skb); hsr_ethhdr = (struct hsr_ethhdr *)skb_mac_header(skb);
return ntohs(hsr_ethhdr->hsr_tag.sequence_nr); return ntohs(hsr_ethhdr->hsr_tag.sequence_nr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册