Commit 6c94b148 authored by Adrian Bunk's avatar Adrian Bunk Committed by Thomas Graf

[RXRPC]: Staticize and remove unused globals and exports.

The patch below contains the following possible cleanups:
- make some needlessly global code static
- remove the following unused global function:
  - transport.c: rxrpc_clear_transport
- remove the following unneeded EXPORT_SYMBOL:
  - rxrpc_syms.c: rxrpc_call_flush
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ebb100c
......@@ -20,9 +20,6 @@
#define RXRPC_CALL_ACK_WINDOW_SIZE 16
extern unsigned rxrpc_call_rcv_timeout; /* receive activity timeout (secs) */
extern unsigned rxrpc_call_acks_timeout; /* pending ACK (retransmit) timeout (secs) */
extern unsigned rxrpc_call_dfr_ack_timeout; /* deferred ACK timeout (secs) */
extern unsigned short rxrpc_call_max_resend; /* maximum consecutive resend count */
/* application call state
* - only state 0 and ffff are reserved, the state is set to 1 after an opid is received
......@@ -210,8 +207,6 @@ extern int rxrpc_call_write_data(struct rxrpc_call *call,
int dup_data,
size_t *size_sent);
extern int rxrpc_call_flush(struct rxrpc_call *call);
extern void rxrpc_call_handle_error(struct rxrpc_call *conn, int local, int errno);
#endif /* _LINUX_RXRPC_CALL_H */
......@@ -124,6 +124,4 @@ struct rxrpc_ackpacket
} __attribute__((packed));
extern const char *rxrpc_acks[];
#endif /* _LINUX_RXRPC_PACKET_H */
......@@ -103,6 +103,4 @@ extern int rxrpc_trans_immediate_abort(struct rxrpc_transport *trans,
struct rxrpc_message *msg,
int error);
extern void rxrpc_clear_transport(struct rxrpc_transport *trans);
#endif /* _LINUX_RXRPC_TRANSPORT_H */
......@@ -27,9 +27,9 @@ LIST_HEAD(rxrpc_calls);
DECLARE_RWSEM(rxrpc_calls_sem);
unsigned rxrpc_call_rcv_timeout = HZ/3;
unsigned rxrpc_call_acks_timeout = HZ/3;
unsigned rxrpc_call_dfr_ack_timeout = HZ/20;
unsigned short rxrpc_call_max_resend = HZ/10;
static unsigned rxrpc_call_acks_timeout = HZ/3;
static unsigned rxrpc_call_dfr_ack_timeout = HZ/20;
static unsigned short rxrpc_call_max_resend = HZ/10;
const char *rxrpc_call_states[] = {
"COMPLETE",
......@@ -58,7 +58,7 @@ const char *rxrpc_pkts[] = {
"?09", "?10", "?11", "?12", "?13", "?14", "?15"
};
const char *rxrpc_acks[] = {
static const char *rxrpc_acks[] = {
"---", "REQ", "DUP", "SEQ", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL",
"-?-"
};
......@@ -79,6 +79,9 @@ static int rxrpc_call_record_ACK(struct rxrpc_call *call,
struct rxrpc_message *msg,
rxrpc_seq_t seq,
size_t count);
static int rxrpc_call_flush(struct rxrpc_call *call);
#define _state(call) \
_debug("[[[ state %s ]]]", rxrpc_call_states[call->app_call_state]);
......@@ -2079,7 +2082,7 @@ int rxrpc_call_write_data(struct rxrpc_call *call,
/*
* flush outstanding packets to the network
*/
int rxrpc_call_flush(struct rxrpc_call *call)
static int rxrpc_call_flush(struct rxrpc_call *call)
{
struct rxrpc_message *msg;
int ret = 0;
......
......@@ -30,6 +30,8 @@ LIST_HEAD(rxrpc_conns);
DECLARE_RWSEM(rxrpc_conns_sem);
unsigned long rxrpc_conn_timeout = 60 * 60;
static void rxrpc_conn_do_timeout(struct rxrpc_connection *conn);
static void __rxrpc_conn_timeout(rxrpc_timer_t *timer)
{
struct rxrpc_connection *conn =
......@@ -415,7 +417,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn)
/*
* free a connection record
*/
void rxrpc_conn_do_timeout(struct rxrpc_connection *conn)
static void rxrpc_conn_do_timeout(struct rxrpc_connection *conn)
{
struct rxrpc_peer *peer;
......
......@@ -73,7 +73,6 @@ extern struct list_head rxrpc_conns;
extern struct rw_semaphore rxrpc_conns_sem;
extern unsigned long rxrpc_conn_timeout;
extern void rxrpc_conn_do_timeout(struct rxrpc_connection *conn);
extern void rxrpc_conn_clearall(struct rxrpc_peer *peer);
/*
......@@ -89,8 +88,6 @@ extern void rxrpc_peer_calculate_rtt(struct rxrpc_peer *peer,
extern void rxrpc_peer_clearall(struct rxrpc_transport *trans);
extern void rxrpc_peer_do_timeout(struct rxrpc_peer *peer);
/*
* proc.c
......
......@@ -30,6 +30,8 @@ LIST_HEAD(rxrpc_peers);
DECLARE_RWSEM(rxrpc_peers_sem);
unsigned long rxrpc_peer_timeout = 12 * 60 * 60;
static void rxrpc_peer_do_timeout(struct rxrpc_peer *peer);
static void __rxrpc_peer_timeout(rxrpc_timer_t *timer)
{
struct rxrpc_peer *peer =
......@@ -259,7 +261,7 @@ void rxrpc_put_peer(struct rxrpc_peer *peer)
* handle a peer timing out in the graveyard
* - called from krxtimod
*/
void rxrpc_peer_do_timeout(struct rxrpc_peer *peer)
static void rxrpc_peer_do_timeout(struct rxrpc_peer *peer)
{
struct rxrpc_transport *trans = peer->trans;
......
......@@ -23,7 +23,6 @@ EXPORT_SYMBOL(rxrpc_put_call);
EXPORT_SYMBOL(rxrpc_call_abort);
EXPORT_SYMBOL(rxrpc_call_read_data);
EXPORT_SYMBOL(rxrpc_call_write_data);
EXPORT_SYMBOL(rxrpc_call_flush);
/* connection.c */
EXPORT_SYMBOL(rxrpc_create_connection);
......
......@@ -148,16 +148,6 @@ int rxrpc_create_transport(unsigned short port,
return ret;
} /* end rxrpc_create_transport() */
/*****************************************************************************/
/*
* clear the connections on a transport endpoint
*/
void rxrpc_clear_transport(struct rxrpc_transport *trans)
{
//struct rxrpc_connection *conn;
} /* end rxrpc_clear_transport() */
/*****************************************************************************/
/*
* destroy a transport endpoint
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment