Skip to content

Commit 040440f

Browse files
committed
fastrpc: hexagonrpcd: use interface-defined inline functions
The inline functions are convenient, but shouldn't be defined in every source file that uses them. Use the new functions defined in the interface definitions.
1 parent 9c210bc commit 040440f

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

hexagonrpcd/listener.c

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,6 @@
3030
#include "iobuffer.h"
3131
#include "listener.h"
3232

33-
static int adsp_listener_init2(int fd)
34-
{
35-
return fastrpc2(&adsp_listener_init2_def, fd, ADSP_LISTENER_HANDLE);
36-
}
37-
38-
static int adsp_listener_next2(int fd,
39-
uint32_t ret_rctx,
40-
uint32_t ret_res,
41-
uint32_t ret_outbuf_len, void *ret_outbuf,
42-
uint32_t *rctx,
43-
uint32_t *handle,
44-
uint32_t *sc,
45-
uint32_t *inbufs_len,
46-
uint32_t inbufs_size, void *inbufs)
47-
{
48-
return fastrpc2(&adsp_listener_next2_def, fd, ADSP_LISTENER_HANDLE,
49-
ret_rctx,
50-
ret_res,
51-
ret_outbuf_len, ret_outbuf,
52-
rctx,
53-
handle,
54-
sc,
55-
inbufs_len,
56-
inbufs_size, inbufs);
57-
}
58-
5933
static struct fastrpc_io_buffer *allocate_outbufs(const struct fastrpc_function_def_interp2 *def,
6034
uint32_t *first_inbuf)
6135
{
@@ -160,7 +134,7 @@ static int return_for_next_invoke(int fd,
160134
outbufs_encode(REMOTE_SCALARS_OUTBUFS(*sc), returned, outbufs);
161135
}
162136

163-
ret = adsp_listener_next2(fd,
137+
ret = adsp_listener3_next2(fd,
164138
*rctx, result,
165139
outbufs_len, outbufs,
166140
rctx, handle, sc,
@@ -290,7 +264,7 @@ int run_fastrpc_listener(int fd,
290264
uint32_t n_outbufs = 0;
291265
int ret;
292266

293-
ret = adsp_listener_init2(fd);
267+
ret = adsp_listener3_init2(fd);
294268
if (ret) {
295269
fprintf(stderr, "Could not initialize the listener: %u\n", ret);
296270
return ret;

hexagonrpcd/rpcd.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ static int remotectl_close(struct fastrpc_context *ctx, void (*err_cb)(const cha
9494
return ret;
9595
}
9696

97-
static int adsp_default_listener_register(struct fastrpc_context *ctx)
98-
{
99-
return fastrpc(&adsp_default_listener_register_def, ctx);
100-
}
101-
10297
static void remotectl_err(const char *err)
10398
{
10499
fprintf(stderr, "Could not remotectl: %s\n", err);
@@ -113,7 +108,7 @@ static int register_fastrpc_listener(int fd)
113108
if (ret)
114109
return 1;
115110

116-
ret = adsp_default_listener_register(ctx);
111+
ret = adsp_default_listener3_register(ctx);
117112
if (ret) {
118113
fprintf(stderr, "Could not register ADSP default listener\n");
119114
goto err;

0 commit comments

Comments
 (0)