Skip to content

Commit e2bc0f9

Browse files
committed
[libc][NFC] Remove unused function from the RPC server
Summary: I missed removing this now-unused function in the previous patch. Remove it to clean up the interface.
1 parent 2cb31fe commit e2bc0f9

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

libc/utils/gpu/server/rpc_server.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,9 @@ struct Server {
3434
Server(std::unique_ptr<rpc::Server<lane_size>> &&server)
3535
: server(std::move(server)) {}
3636

37-
uint64_t allocation_size(uint64_t port_count) {
38-
uint64_t ret = 0;
39-
std::visit([&](auto &server) { ret = server->allocation_size(port_count); },
40-
server);
41-
return ret;
42-
}
43-
4437
rpc_status_t handle_server(
45-
std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
46-
std::unordered_map<rpc_opcode_t, void *> &callback_data) {
38+
const std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
39+
const std::unordered_map<rpc_opcode_t, void *> &callback_data) {
4740
rpc_status_t ret = RPC_STATUS_SUCCESS;
4841
std::visit(
4942
[&](auto &server) {
@@ -57,8 +50,8 @@ struct Server {
5750
template <uint32_t lane_size>
5851
rpc_status_t handle_server(
5952
rpc::Server<lane_size> &server,
60-
std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
61-
std::unordered_map<rpc_opcode_t, void *> &callback_data) {
53+
const std::unordered_map<rpc_opcode_t, rpc_opcode_callback_ty> &callbacks,
54+
const std::unordered_map<rpc_opcode_t, void *> &callback_data) {
6255
auto port = server.try_open();
6356
if (!port)
6457
return RPC_STATUS_SUCCESS;

0 commit comments

Comments
 (0)