Skip to content

Commit a7d13fb

Browse files
Gerrit Renkerdavem330
authored andcommitted
dccp: remove unused function argument
This removes an unused 'sk' argument from several option-inserting functions. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 87cad5c commit a7d13fb

4 files changed

Lines changed: 13 additions & 19 deletions

File tree

‎net/dccp/ackvec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ int dccp_insert_option_ackvec(struct sock *sk, struct sk_buff *skb)
8282
elapsed_time = delta / 10;
8383

8484
if (elapsed_time != 0 &&
85-
dccp_insert_option_elapsed_time(sk, skb, elapsed_time))
85+
dccp_insert_option_elapsed_time(skb, elapsed_time))
8686
return -1;
8787

8888
avr = dccp_ackvec_record_new();

‎net/dccp/ccids/ccid3.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,9 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
715715
x_recv = htonl(hc->rx_x_recv);
716716
pinv = htonl(hc->rx_pinv);
717717

718-
if (dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE,
718+
if (dccp_insert_option(skb, TFRC_OPT_LOSS_EVENT_RATE,
719719
&pinv, sizeof(pinv)) ||
720-
dccp_insert_option(sk, skb, TFRC_OPT_RECEIVE_RATE,
720+
dccp_insert_option(skb, TFRC_OPT_RECEIVE_RATE,
721721
&x_recv, sizeof(x_recv)))
722722
return -1;
723723

‎net/dccp/dccp.h‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,12 @@ extern void dccp_feat_list_purge(struct list_head *fn_list);
446446

447447
extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
448448
extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
449-
extern int dccp_insert_option_elapsed_time(struct sock *sk,
450-
struct sk_buff *skb,
451-
u32 elapsed_time);
449+
extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
452450
extern u32 dccp_timestamp(void);
453451
extern void dccp_timestamping_init(void);
454-
extern int dccp_insert_option_timestamp(struct sock *sk,
455-
struct sk_buff *skb);
456-
extern int dccp_insert_option(struct sock *sk, struct sk_buff *skb,
457-
unsigned char option,
458-
const void *value, unsigned char len);
452+
extern int dccp_insert_option_timestamp(struct sk_buff *skb);
453+
extern int dccp_insert_option(struct sk_buff *skb, unsigned char option,
454+
const void *value, unsigned char len);
459455

460456
#ifdef CONFIG_SYSCTL
461457
extern int dccp_sysctl_init(void);

‎net/dccp/options.c‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,8 @@ static inline u8 dccp_ndp_len(const u64 ndp)
299299
return likely(ndp <= USHRT_MAX) ? 2 : (ndp <= UINT_MAX ? 4 : 6);
300300
}
301301

302-
int dccp_insert_option(struct sock *sk, struct sk_buff *skb,
303-
const unsigned char option,
304-
const void *value, const unsigned char len)
302+
int dccp_insert_option(struct sk_buff *skb, const unsigned char option,
303+
const void *value, const unsigned char len)
305304
{
306305
unsigned char *to;
307306

@@ -354,8 +353,7 @@ static inline int dccp_elapsed_time_len(const u32 elapsed_time)
354353
return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
355354
}
356355

357-
int dccp_insert_option_elapsed_time(struct sock *sk, struct sk_buff *skb,
358-
u32 elapsed_time)
356+
int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
359357
{
360358
const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
361359
const int len = 2 + elapsed_time_len;
@@ -386,13 +384,13 @@ int dccp_insert_option_elapsed_time(struct sock *sk, struct sk_buff *skb,
386384

387385
EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
388386

389-
int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
387+
int dccp_insert_option_timestamp(struct sk_buff *skb)
390388
{
391389
__be32 now = htonl(dccp_timestamp());
392390
/* yes this will overflow but that is the point as we want a
393391
* 10 usec 32 bit timer which mean it wraps every 11.9 hours */
394392

395-
return dccp_insert_option(sk, skb, DCCPO_TIMESTAMP, &now, sizeof(now));
393+
return dccp_insert_option(skb, DCCPO_TIMESTAMP, &now, sizeof(now));
396394
}
397395

398396
EXPORT_SYMBOL_GPL(dccp_insert_option_timestamp);
@@ -533,7 +531,7 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
533531
* Obtain RTT sample from Request/Response exchange.
534532
* This is currently used in CCID 3 initialisation.
535533
*/
536-
if (dccp_insert_option_timestamp(sk, skb))
534+
if (dccp_insert_option_timestamp(skb))
537535
return -1;
538536

539537
} else if (dp->dccps_hc_rx_ackvec != NULL &&

0 commit comments

Comments
 (0)