From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Neil Horman <nhorman@tuxdriver.com>,
davem@davemloft.net
Subject: [PATCH net-next 10/11] sctp: remove the typedef sctp_heartbeat_chunk_t
Date: Sun, 23 Jul 2017 09:34:35 +0800 [thread overview]
Message-ID: <cff8b94db487caa09014f0de9e94e28a13a9e43d.1500773578.git.lucien.xin@gmail.com> (raw)
In-Reply-To: <5de5ee9134309f0111da5edd768faf7aaff1c9fc.1500773578.git.lucien.xin@gmail.com>
In-Reply-To: <cover.1500773578.git.lucien.xin@gmail.com>
This patch is to remove the typedef sctp_heartbeat_chunk_t, and
replace with struct sctp_heartbeat_chunk in the places where it's
using this typedef.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/linux/sctp.h | 4 ++--
net/sctp/sm_statefuns.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 6e26b86..bfda7c6 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -398,10 +398,10 @@ struct sctp_heartbeathdr {
struct sctp_paramhdr info;
};
-typedef struct sctp_heartbeat_chunk {
+struct sctp_heartbeat_chunk {
struct sctp_chunkhdr chunk_hdr;
struct sctp_heartbeathdr hb_hdr;
-} sctp_heartbeat_chunk_t;
+};
/* For the abort and shutdown ACK we must carry the init tag in the
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 32ac90b..7bbee08 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1088,7 +1088,8 @@ sctp_disposition_t sctp_sf_beat_8_3(struct net *net,
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
/* Make sure that the HEARTBEAT chunk has a valid length. */
- if (!sctp_chunk_length_valid(chunk, sizeof(sctp_heartbeat_chunk_t)))
+ if (!sctp_chunk_length_valid(chunk,
+ sizeof(struct sctp_heartbeat_chunk)))
return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
commands);
--
2.1.0
next prev parent reply other threads:[~2017-07-23 1:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 1:34 [PATCH net-next 00/11] sctp: remove typedefs from structures part 3 Xin Long
2017-07-23 1:34 ` [PATCH net-next 01/11] sctp: remove the typedef sctp_initack_chunk_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 02/11] sctp: remove the typedef sctp_cookie_param_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 03/11] sctp: remove the typedef sctp_unrecognized_param_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 04/11] sctp: remove the typedef sctp_gap_ack_block_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 05/11] sctp: remove the typedef sctp_dup_tsn_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 06/11] sctp: remove the typedef sctp_sack_variable_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 07/11] sctp: remove the typedef sctp_sackhdr_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 08/11] sctp: remove the typedef sctp_sack_chunk_t Xin Long
2017-07-23 1:34 ` [PATCH net-next 09/11] sctp: remove the typedef sctp_heartbeathdr_t Xin Long
2017-07-23 1:34 ` Xin Long [this message]
2017-07-23 1:34 ` [PATCH net-next 11/11] sctp: remove the typedef sctp_abort_chunk_t Xin Long
2017-07-24 23:01 ` [PATCH net-next 00/11] sctp: remove typedefs from structures part 3 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=cff8b94db487caa09014f0de9e94e28a13a9e43d.1500773578.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).