From: Stephen Hemminger <stephen@networkplumber.org>
To: Gerrit Renker <gerrit@erg.abdn.ac.uk>,
David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 2/2] dccp: remove obsolete code
Date: Sat, 4 Jan 2014 13:46:11 -0800 [thread overview]
Message-ID: <20140104134611.05cc16e2@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20140104134445.01a49cc6@nehalam.linuxnetplumber.net>
This function is defined but not used.
Remove it now, can be resurrected if ever needed.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
net/dccp/dccp.h | 1 -
net/dccp/options.c | 32 --------------------------------
2 files changed, 33 deletions(-)
--- a/net/dccp/dccp.h 2014-01-04 13:39:54.444218991 -0800
+++ b/net/dccp/dccp.h 2014-01-04 13:42:22.829764045 -0800
@@ -479,7 +479,6 @@ void dccp_feat_list_purge(struct list_he
int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *);
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
u32 dccp_timestamp(void);
void dccp_timestamping_init(void);
int dccp_insert_option(struct sk_buff *skb, unsigned char option,
--- a/net/dccp/options.c 2014-01-04 13:39:54.444218991 -0800
+++ b/net/dccp/options.c 2014-01-04 13:42:22.833763979 -0800
@@ -343,38 +343,6 @@ static inline int dccp_elapsed_time_len(
return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
}
-/* FIXME: This function is currently not used anywhere */
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
-{
- const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
- const int len = 2 + elapsed_time_len;
- unsigned char *to;
-
- if (elapsed_time_len == 0)
- return 0;
-
- if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
- return -1;
-
- DCCP_SKB_CB(skb)->dccpd_opt_len += len;
-
- to = skb_push(skb, len);
- *to++ = DCCPO_ELAPSED_TIME;
- *to++ = len;
-
- if (elapsed_time_len == 2) {
- const __be16 var16 = htons((u16)elapsed_time);
- memcpy(to, &var16, 2);
- } else {
- const __be32 var32 = htonl(elapsed_time);
- memcpy(to, &var32, 4);
- }
-
- return 0;
-}
-
-EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
-
static int dccp_insert_option_timestamp(struct sk_buff *skb)
{
__be32 now = htonl(dccp_timestamp());
next parent reply other threads:[~2014-01-04 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140104134445.01a49cc6@nehalam.linuxnetplumber.net>
2014-01-04 21:46 ` Stephen Hemminger [this message]
2014-01-05 1:20 ` [PATCH net-next 2/2] dccp: remove obsolete code 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=20140104134611.05cc16e2@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=gerrit@erg.abdn.ac.uk \
--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;
as well as URLs for NNTP newsgroup(s).