From 8c3e34a4ff85142ca5dba3f18cbc2061899e2612 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 13 Jun 2016 12:16:05 +0100 Subject: [PATCH 1/2] rxrpc: Rename files matching ar-*.c to git rid of the "ar-" prefix Rename files matching net/rxrpc/ar-*.c to get rid of the "ar-" prefix. This will aid splitting those files by making easier to come up with new names. Note that the not all files are simply renamed from ar-X.c to X.c. The following exceptions are made: (*) ar-call.c -> call_object.c ar-ack.c -> call_event.c call_object.c is going to contain the core of the call object handling. Call event handling is all going to be in call_event.c. (*) ar-accept.c -> call_accept.c Incoming call handling is going to be here. (*) ar-connection.c -> conn_object.c ar-connevent.c -> conn_event.c The former file is going to have the basic connection object handling, but there will likely be some differentiation between client connections and service connections in additional files later. The latter file will have all the connection-level event handling. (*) ar-local.c -> local_object.c This will have the local endpoint object handling code. The local endpoint event handling code will later be split out into local_event.c. (*) ar-peer.c -> peer_object.c This will have the peer endpoint object handling code. Peer event handling code will be placed in peer_event.c (for the moment, there is none). (*) ar-error.c -> peer_event.c This will become the peer event handling code, though for the moment it's actually driven from the local endpoint's perspective. Note that I haven't renamed ar-transport.c to transport_object.c as the intention is to delete it when the rxrpc_transport struct is excised. The only file that actually has its contents changed is net/rxrpc/Makefile. net/rxrpc/ar-internal.h will need its section marker comments updating, but I'll do that in a separate patch to make it easier for git to follow the history across the rename. I may also want to rename ar-internal.h at some point - but that would mean updating all the #includes and I'd rather do that in a separate step. Signed-off-by: David Howells call_accept.c} | 0 net/rxrpc/{ar-ack.c => call_event.c} | 0 net/rxrpc/{ar-call.c => call_object.c} | 0 net/rxrpc/{ar-connevent.c => conn_event.c} | 0 net/rxrpc/{ar-connection.c => conn_object.c} | 0 net/rxrpc/{ar-input.c => input.c} | 0 net/rxrpc/{ar-key.c => key.c} | 0 net/rxrpc/{ar-local.c => local_object.c} | 0 net/rxrpc/{ar-output.c => output.c} | 0 net/rxrpc/{ar-error.c => peer_event.c} | 0 net/rxrpc/{ar-peer.c => peer_object.c} | 0 net/rxrpc/{ar-proc.c => proc.c} | 0 net/rxrpc/{ar-recvmsg.c => recvmsg.c} | 0 net/rxrpc/{ar-security.c => security.c} | 0 net/rxrpc/{ar-skbuff.c => skbuff.c} | 0 net/rxrpc/{ar-transport.c => transport.c} | 0 17 files changed, 17 insertions(+), 17 deletions(-) rename net/rxrpc/{ar-accept.c => call_accept.c} (100%) rename net/rxrpc/{ar-ack.c => call_event.c} (100%) rename net/rxrpc/{ar-call.c => call_object.c} (100%) rename net/rxrpc/{ar-connevent.c => conn_event.c} (100%) rename net/rxrpc/{ar-connection.c => conn_object.c} (100%) rename net/rxrpc/{ar-input.c => input.c} (100%) rename net/rxrpc/{ar-key.c => key.c} (100%) rename net/rxrpc/{ar-local.c => local_object.c} (100%) rename net/rxrpc/{ar-output.c => output.c} (100%) rename net/rxrpc/{ar-error.c => peer_event.c} (100%) rename net/rxrpc/{ar-peer.c => peer_object.c} (100%) rename net/rxrpc/{ar-proc.c => proc.c} (100%) rename net/rxrpc/{ar-recvmsg.c => recvmsg.c} (100%) rename net/rxrpc/{ar-security.c => security.c} (100%) rename net/rxrpc/{ar-skbuff.c => skbuff.c} (100%) rename net/rxrpc/{ar-transport.c => transport.c} (100%) diff --git a/net/rxrpc/Makefile b/net/rxrpc/Makefile index e05a06ef2254..7e1006a3bfa5 100644 --- a/net/rxrpc/Makefile +++ b/net/rxrpc/Makefile @@ -4,25 +4,25 @@ af-rxrpc-y := \ af_rxrpc.o \ - ar-accept.o \ - ar-ack.o \ - ar-call.o \ - ar-connection.o \ - ar-connevent.o \ - ar-error.o \ - ar-input.o \ - ar-key.o \ - ar-local.o \ - ar-output.o \ - ar-peer.o \ - ar-recvmsg.o \ - ar-security.o \ - ar-skbuff.o \ - ar-transport.o \ + call_accept.o \ + call_event.o \ + call_object.o \ + conn_event.o \ + conn_object.o \ + input.o \ insecure.o \ - misc.o + key.o \ + local_object.o \ + misc.o \ + output.o \ + peer_event.o \ + peer_object.o \ + recvmsg.o \ + security.o \ + skbuff.o \ + transport.o -af-rxrpc-$(CONFIG_PROC_FS) += ar-proc.o +af-rxrpc-$(CONFIG_PROC_FS) += proc.o af-rxrpc-$(CONFIG_RXKAD) += rxkad.o af-rxrpc-$(CONFIG_SYSCTL) += sysctl.o diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/call_accept.c similarity index 100% rename from net/rxrpc/ar-accept.c rename to net/rxrpc/call_accept.c diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/call_event.c similarity index 100% rename from net/rxrpc/ar-ack.c rename to net/rxrpc/call_event.c diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/call_object.c similarity index 100% rename from net/rxrpc/ar-call.c rename to net/rxrpc/call_object.c diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/conn_event.c similarity index 100% rename from net/rxrpc/ar-connevent.c rename to net/rxrpc/conn_event.c diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/conn_object.c similarity index 100% rename from net/rxrpc/ar-connection.c rename to net/rxrpc/conn_object.c diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/input.c similarity index 100% rename from net/rxrpc/ar-input.c rename to net/rxrpc/input.c diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/key.c similarity index 100% rename from net/rxrpc/ar-key.c rename to net/rxrpc/key.c diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/local_object.c similarity index 100% rename from net/rxrpc/ar-local.c rename to net/rxrpc/local_object.c diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/output.c similarity index 100% rename from net/rxrpc/ar-output.c rename to net/rxrpc/output.c diff --git a/net/rxrpc/ar-error.c b/net/rxrpc/peer_event.c similarity index 100% rename from net/rxrpc/ar-error.c rename to net/rxrpc/peer_event.c diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/peer_object.c similarity index 100% rename from net/rxrpc/ar-peer.c rename to net/rxrpc/peer_object.c diff --git a/net/rxrpc/ar-proc.c b/net/rxrpc/proc.c similarity index 100% rename from net/rxrpc/ar-proc.c rename to net/rxrpc/proc.c diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/recvmsg.c similarity index 100% rename from net/rxrpc/ar-recvmsg.c rename to net/rxrpc/recvmsg.c diff --git a/net/rxrpc/ar-security.c b/net/rxrpc/security.c similarity index 100% rename from net/rxrpc/ar-security.c rename to net/rxrpc/security.c diff --git a/net/rxrpc/ar-skbuff.c b/net/rxrpc/skbuff.c similarity index 100% rename from net/rxrpc/ar-skbuff.c rename to net/rxrpc/skbuff.c diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/transport.c similarity index 100% rename from net/rxrpc/ar-transport.c rename to net/rxrpc/transport.c From 0d81a51ab94a536a9fb742a5546b6d011ed26c7f Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 13 Jun 2016 13:30:30 +0100 Subject: [PATCH 2/2] rxrpc: Update the comments in ar-internal.h to reflect renames Update the section comments in ar-internal.h that indicate the locations of the referenced items to reflect the renames done to the .c files in net/rxrpc/. This also involves some rearrangement to reflect keep the sections in order of filename. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 160 ++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index f715cca767cd..03919b9a8a31 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h @@ -482,21 +482,21 @@ extern struct rxrpc_transport *rxrpc_name_to_transport(struct rxrpc_sock *, int, int, gfp_t); /* - * ar-accept.c + * call_accept.c */ void rxrpc_accept_incoming_calls(struct work_struct *); struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *, unsigned long); int rxrpc_reject_call(struct rxrpc_sock *); /* - * ar-ack.c + * call_event.c */ void __rxrpc_propose_ACK(struct rxrpc_call *, u8, u32, bool); void rxrpc_propose_ACK(struct rxrpc_call *, u8, u32, bool); void rxrpc_process_call(struct work_struct *); /* - * ar-call.c + * call_object.c */ extern unsigned int rxrpc_max_call_lifetime; extern unsigned int rxrpc_dead_call_expiry; @@ -520,7 +520,14 @@ void __rxrpc_put_call(struct rxrpc_call *); void __exit rxrpc_destroy_all_calls(void); /* - * ar-connection.c + * conn_event.c + */ +void rxrpc_process_connection(struct work_struct *); +void rxrpc_reject_packet(struct rxrpc_local *, struct sk_buff *); +void rxrpc_reject_packets(struct work_struct *); + +/* + * conn_object.c */ extern unsigned int rxrpc_connection_expiry; extern struct list_head rxrpc_connections; @@ -540,36 +547,19 @@ extern struct rxrpc_connection * rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *); /* - * ar-connevent.c - */ -void rxrpc_process_connection(struct work_struct *); -void rxrpc_reject_packet(struct rxrpc_local *, struct sk_buff *); -void rxrpc_reject_packets(struct work_struct *); - -/* - * ar-error.c - */ -void rxrpc_UDP_error_report(struct sock *); -void rxrpc_UDP_error_handler(struct work_struct *); - -/* - * ar-input.c + * input.c */ void rxrpc_data_ready(struct sock *); int rxrpc_queue_rcv_skb(struct rxrpc_call *, struct sk_buff *, bool, bool); void rxrpc_fast_process_packet(struct rxrpc_call *, struct sk_buff *); /* - * ar-local.c + * insecure.c */ -extern rwlock_t rxrpc_local_lock; - -struct rxrpc_local *rxrpc_lookup_local(struct sockaddr_rxrpc *); -void rxrpc_put_local(struct rxrpc_local *); -void __exit rxrpc_destroy_all_locals(void); +extern const struct rxrpc_security rxrpc_no_security; /* - * ar-key.c + * key.c */ extern struct key_type key_type_rxrpc; extern struct key_type key_type_rxrpc_s; @@ -580,63 +570,13 @@ int rxrpc_get_server_data_key(struct rxrpc_connection *, const void *, time_t, u32); /* - * ar-output.c + * local_object.c */ -extern unsigned int rxrpc_resend_timeout; +extern rwlock_t rxrpc_local_lock; -int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *); -int rxrpc_do_sendmsg(struct rxrpc_sock *, struct msghdr *, size_t); - -/* - * ar-peer.c - */ -struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *, gfp_t); -void rxrpc_put_peer(struct rxrpc_peer *); -struct rxrpc_peer *rxrpc_find_peer(struct rxrpc_local *, __be32, __be16); -void __exit rxrpc_destroy_all_peers(void); - -/* - * ar-proc.c - */ -extern const char *const rxrpc_call_states[]; -extern const struct file_operations rxrpc_call_seq_fops; -extern const struct file_operations rxrpc_connection_seq_fops; - -/* - * ar-recvmsg.c - */ -void rxrpc_remove_user_ID(struct rxrpc_sock *, struct rxrpc_call *); -int rxrpc_recvmsg(struct socket *, struct msghdr *, size_t, int); - -/* - * ar-security.c - */ -int __init rxrpc_init_security(void); -void rxrpc_exit_security(void); -int rxrpc_init_client_conn_security(struct rxrpc_connection *); -int rxrpc_init_server_conn_security(struct rxrpc_connection *); - -/* - * ar-skbuff.c - */ -void rxrpc_packet_destructor(struct sk_buff *); - -/* - * ar-transport.c - */ -extern unsigned int rxrpc_transport_expiry; - -struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *, - struct rxrpc_peer *, gfp_t); -void rxrpc_put_transport(struct rxrpc_transport *); -void __exit rxrpc_destroy_all_transports(void); -struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *, - struct rxrpc_peer *); - -/* - * insecure.c - */ -extern const struct rxrpc_security rxrpc_no_security; +struct rxrpc_local *rxrpc_lookup_local(struct sockaddr_rxrpc *); +void rxrpc_put_local(struct rxrpc_local *); +void __exit rxrpc_destroy_all_locals(void); /* * misc.c @@ -654,6 +594,41 @@ extern const s8 rxrpc_ack_priority[]; extern const char *rxrpc_acks(u8 reason); +/* + * output.c + */ +extern unsigned int rxrpc_resend_timeout; + +int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *); +int rxrpc_do_sendmsg(struct rxrpc_sock *, struct msghdr *, size_t); + +/* + * peer_error.c + */ +void rxrpc_UDP_error_report(struct sock *); +void rxrpc_UDP_error_handler(struct work_struct *); + +/* + * peer_object.c + */ +struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *, gfp_t); +void rxrpc_put_peer(struct rxrpc_peer *); +struct rxrpc_peer *rxrpc_find_peer(struct rxrpc_local *, __be32, __be16); +void __exit rxrpc_destroy_all_peers(void); + +/* + * proc.c + */ +extern const char *const rxrpc_call_states[]; +extern const struct file_operations rxrpc_call_seq_fops; +extern const struct file_operations rxrpc_connection_seq_fops; + +/* + * recvmsg.c + */ +void rxrpc_remove_user_ID(struct rxrpc_sock *, struct rxrpc_call *); +int rxrpc_recvmsg(struct socket *, struct msghdr *, size_t, int); + /* * rxkad.c */ @@ -661,6 +636,19 @@ extern const char *rxrpc_acks(u8 reason); extern const struct rxrpc_security rxkad; #endif +/* + * security.c + */ +int __init rxrpc_init_security(void); +void rxrpc_exit_security(void); +int rxrpc_init_client_conn_security(struct rxrpc_connection *); +int rxrpc_init_server_conn_security(struct rxrpc_connection *); + +/* + * skbuff.c + */ +void rxrpc_packet_destructor(struct sk_buff *); + /* * sysctl.c */ @@ -672,6 +660,18 @@ static inline int __init rxrpc_sysctl_init(void) { return 0; } static inline void rxrpc_sysctl_exit(void) {} #endif +/* + * transport.c + */ +extern unsigned int rxrpc_transport_expiry; + +struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *, + struct rxrpc_peer *, gfp_t); +void rxrpc_put_transport(struct rxrpc_transport *); +void __exit rxrpc_destroy_all_transports(void); +struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *, + struct rxrpc_peer *); + /* * debug tracing */