From: Murali Karicheri <m-karicheri2@ti.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <arvid.brodin@alten.se>,
<a-kramer@ti.com>
Subject: [PATCH net 07/14] net: hsr: remove unnecessary space after a cast
Date: Fri, 5 Apr 2019 13:31:29 -0400 [thread overview]
Message-ID: <20190405173136.18050-8-m-karicheri2@ti.com> (raw)
In-Reply-To: <20190405173136.18050-1-m-karicheri2@ti.com>
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>
---
net/hsr/hsr_forward.c | 10 +++++-----
net/hsr/hsr_framereg.c | 10 +++++-----
net/hsr/hsr_main.h | 10 +++++-----
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)
struct hsrv1_ethhdr_sp *hsrV1Hdr;
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? */
if (!ether_addr_equal(ethHdr->h_dest,
@@ -67,14 +67,14 @@ static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
/* Get the supervision header from correct location. */
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))
return false;
hsrSupTag = &hsrV1Hdr->hsr_sup;
} else {
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 &&
@@ -140,7 +140,7 @@ static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame,
if (frame->is_vlan)
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_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size);
@@ -320,7 +320,7 @@ static int hsr_fill_frame_info(struct hsr_frame_info *frame,
if (!frame->node_src)
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;
if (ethhdr->h_proto == htons(ETH_P_8021Q)) {
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)
/* Remove inconsistency where
* seq_nr_after(a, b) == seq_nr_before(a, b)
*/
- if ((int) b - a == 32768)
+ if ((int)b - a == 32768)
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_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,
if (!skb_mac_header_was_set(skb))
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) {
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,
struct list_head *node_db;
int i;
- ethhdr = (struct ethhdr *) skb_mac_header(skb);
+ ethhdr = (struct ethhdr *)skb_mac_header(skb);
/* Leave the ethernet header. */
skb_pull(skb, sizeof(struct ethhdr));
@@ -230,7 +230,7 @@ void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr,
/* And leave the 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 */
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 {
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)
{
- 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)
{
- 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)
{
- 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 {
@@ -179,7 +179,7 @@ static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
{
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);
}
--
2.17.0
next prev parent reply other threads:[~2019-04-05 17:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 17:31 [PATCH net 00/14] net: hsr: improvements and bug fixes Murali Karicheri
2019-04-05 17:31 ` [PATCH net 01/14] net: hsr: fix lines exceeding 80 characters Murali Karicheri
2019-04-05 17:31 ` [PATCH net 02/14] net: hsr: fix multiple blank lines in the code Murali Karicheri
2019-04-05 17:31 ` [PATCH net 03/14] net: hsr: remove unnecessary paranthesis from " Murali Karicheri
2019-04-05 17:31 ` [PATCH net 04/14] net: hsr: fix alignment issues in the code for functions Murali Karicheri
2019-04-05 17:31 ` [PATCH net 05/14] net: hsr: fix lines that ends with a '(' Murali Karicheri
2019-04-05 17:31 ` [PATCH net 06/14] net: hsr: fix NULL checks in the code Murali Karicheri
2019-04-05 17:31 ` Murali Karicheri [this message]
2019-04-05 17:31 ` [PATCH net 08/14] net: hsr: fix placement of logical operator in a multi-line statement Murali Karicheri
2019-04-05 17:31 ` [PATCH net 09/14] net: hsr: add missing space around operator in code Murali Karicheri
2019-04-05 17:31 ` [PATCH net 10/14] net: hsr: remove camel case usage in the code Murali Karicheri
2019-04-05 17:31 ` [PATCH net 11/14] net: hsr: add blank line after function declaration Murali Karicheri
2019-04-05 17:31 ` [PATCH net 12/14] net: hsr: convert to SPDX identifier Murali Karicheri
2019-04-05 17:31 ` [PATCH net 13/14] net: hsr: add debugfs support for display node list Murali Karicheri
2019-04-05 17:31 ` [PATCH net 14/14] net: hsr: Fix node prune function for forget time expiry Murali Karicheri
2019-04-07 1:32 ` [PATCH net 00/14] net: hsr: improvements and bug fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190405173136.18050-8-m-karicheri2@ti.com \
--to=m-karicheri2@ti.com \
--cc=a-kramer@ti.com \
--cc=arvid.brodin@alten.se \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®