Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rxrpc: Remove deadcode

Remove three functions that are no longer used.

rxrpc_get_txbuf() last use was removed by 2020's
commit 5e6ef4f1017c ("rxrpc: Make the I/O thread take over the call and
local processor work")

rxrpc_kernel_get_epoch() last use was removed by 2020's
commit 44746355ccb1 ("afs: Don't get epoch from a server because it may be
ambiguous")

rxrpc_kernel_set_max_life() last use was removed by 2023's
commit db099c625b13 ("rxrpc: Fix timeout of a call that hasn't yet been
granted a channel")

Both of the rxrpc_kernel_* functions were documented. Remove that
documentation as well as the code.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20250422235147.146460-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Jakub Kicinski
39144062 6fdc754b

-77
-24
Documentation/networking/rxrpc.rst
··· 1062 1062 first function to change. Note that this must be called in TASK_RUNNING 1063 1063 state. 1064 1064 1065 - (#) Get remote client epoch:: 1066 - 1067 - u32 rxrpc_kernel_get_epoch(struct socket *sock, 1068 - struct rxrpc_call *call) 1069 - 1070 - This allows the epoch that's contained in packets of an incoming client 1071 - call to be queried. This value is returned. The function always 1072 - successful if the call is still in progress. It shouldn't be called once 1073 - the call has expired. Note that calling this on a local client call only 1074 - returns the local epoch. 1075 - 1076 - This value can be used to determine if the remote client has been 1077 - restarted as it shouldn't change otherwise. 1078 - 1079 - (#) Set the maximum lifespan on a call:: 1080 - 1081 - void rxrpc_kernel_set_max_life(struct socket *sock, 1082 - struct rxrpc_call *call, 1083 - unsigned long hard_timeout) 1084 - 1085 - This sets the maximum lifespan on a call to hard_timeout (which is in 1086 - jiffies). In the event of the timeout occurring, the call will be 1087 - aborted and -ETIME or -ETIMEDOUT will be returned. 1088 - 1089 1065 (#) Apply the RXRPC_MIN_SECURITY_LEVEL sockopt to a socket from within in the 1090 1066 kernel:: 1091 1067
-3
include/net/af_rxrpc.h
··· 88 88 unsigned int debug_id); 89 89 void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); 90 90 bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); 91 - u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); 92 - void rxrpc_kernel_set_max_life(struct socket *, struct rxrpc_call *, 93 - unsigned long); 94 91 95 92 int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val); 96 93 int rxrpc_sock_set_security_keyring(struct sock *, struct key *);
-41
net/rxrpc/af_rxrpc.c
··· 461 461 EXPORT_SYMBOL(rxrpc_kernel_check_life); 462 462 463 463 /** 464 - * rxrpc_kernel_get_epoch - Retrieve the epoch value from a call. 465 - * @sock: The socket the call is on 466 - * @call: The call to query 467 - * 468 - * Allow a kernel service to retrieve the epoch value from a service call to 469 - * see if the client at the other end rebooted. 470 - * 471 - * Return: The epoch of the call's connection. 472 - */ 473 - u32 rxrpc_kernel_get_epoch(struct socket *sock, struct rxrpc_call *call) 474 - { 475 - return call->conn->proto.epoch; 476 - } 477 - EXPORT_SYMBOL(rxrpc_kernel_get_epoch); 478 - 479 - /** 480 464 * rxrpc_kernel_set_notifications - Set table of callback operations 481 465 * @sock: The socket to install table upon 482 466 * @app_ops: Callback operation table to set ··· 475 491 rx->app_ops = app_ops; 476 492 } 477 493 EXPORT_SYMBOL(rxrpc_kernel_set_notifications); 478 - 479 - /** 480 - * rxrpc_kernel_set_max_life - Set maximum lifespan on a call 481 - * @sock: The socket the call is on 482 - * @call: The call to configure 483 - * @hard_timeout: The maximum lifespan of the call in ms 484 - * 485 - * Set the maximum lifespan of a call. The call will end with ETIME or 486 - * ETIMEDOUT if it takes longer than this. 487 - */ 488 - void rxrpc_kernel_set_max_life(struct socket *sock, struct rxrpc_call *call, 489 - unsigned long hard_timeout) 490 - { 491 - ktime_t delay = ms_to_ktime(hard_timeout), expect_term_by; 492 - 493 - mutex_lock(&call->user_mutex); 494 - 495 - expect_term_by = ktime_add(ktime_get_real(), delay); 496 - WRITE_ONCE(call->expect_term_by, expect_term_by); 497 - trace_rxrpc_timer_set(call, delay, rxrpc_timer_trace_hard); 498 - rxrpc_poke_call(call, rxrpc_call_poke_set_timeout); 499 - 500 - mutex_unlock(&call->user_mutex); 501 - } 502 - EXPORT_SYMBOL(rxrpc_kernel_set_max_life); 503 494 504 495 /* 505 496 * connect an RxRPC socket
-1
net/rxrpc/ar-internal.h
··· 1503 1503 extern atomic_t rxrpc_nr_txbuf; 1504 1504 struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_size, 1505 1505 size_t data_align, gfp_t gfp); 1506 - void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what); 1507 1506 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what); 1508 1507 void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what); 1509 1508
-8
net/rxrpc/txbuf.c
··· 60 60 return txb; 61 61 } 62 62 63 - void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) 64 - { 65 - int r; 66 - 67 - __refcount_inc(&txb->ref, &r); 68 - trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r + 1, what); 69 - } 70 - 71 63 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) 72 64 { 73 65 int r = refcount_read(&txb->ref);