Skip to content

Commit 20b4f0b

Browse files
Dr. David Alan Gilbertmathieupoirier
authored andcommitted
rpmsg: core: Remove deadcode
rpmsg_send_offchannel() and rpmsg_trysend_offchannel() have been unused since they were added in 2011's commit bcabbcc ("rpmsg: add virtio-based remote processor messaging bus") Remove them and associated docs. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 0af2f6b commit 20b4f0b

File tree

3 files changed

+0
-131
lines changed

3 files changed

+0
-131
lines changed

Documentation/staging/rpmsg.rst

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -110,31 +110,6 @@ or a timeout of 15 seconds elapses. When the latter happens,
110110
The function can only be called from a process context (for now).
111111
Returns 0 on success and an appropriate error value on failure.
112112

113-
::
114-
115-
int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
116-
void *data, int len);
117-
118-
119-
sends a message across to the remote processor, using the src and dst
120-
addresses provided by the user.
121-
122-
The caller should specify the endpoint, the data it wants to send,
123-
its length (in bytes), and explicit source and destination addresses.
124-
The message will then be sent to the remote processor to which the
125-
endpoint's channel belongs, but the endpoint's src and channel dst
126-
addresses will be ignored (and the user-provided addresses will
127-
be used instead).
128-
129-
In case there are no TX buffers available, the function will block until
130-
one becomes available (i.e. until the remote processor consumes
131-
a tx buffer and puts it back on virtio's used descriptor ring),
132-
or a timeout of 15 seconds elapses. When the latter happens,
133-
-ERESTARTSYS is returned.
134-
135-
The function can only be called from a process context (for now).
136-
Returns 0 on success and an appropriate error value on failure.
137-
138113
::
139114

140115
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
@@ -173,27 +148,6 @@ return -ENOMEM without waiting until one becomes available.
173148
The function can only be called from a process context (for now).
174149
Returns 0 on success and an appropriate error value on failure.
175150

176-
::
177-
178-
int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
179-
void *data, int len);
180-
181-
182-
sends a message across to the remote processor, using source and
183-
destination addresses provided by the user.
184-
185-
The user should specify the channel, the data it wants to send,
186-
its length (in bytes), and explicit source and destination addresses.
187-
The message will then be sent to the remote processor to which the
188-
channel belongs, but the channel's src and dst addresses will be
189-
ignored (and the user-provided addresses will be used instead).
190-
191-
In case there are no TX buffers available, the function will immediately
192-
return -ENOMEM without waiting until one becomes available.
193-
194-
The function can only be called from a process context (for now).
195-
Returns 0 on success and an appropriate error value on failure.
196-
197151
::
198152

199153
struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev,

drivers/rpmsg/rpmsg_core.c

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -193,38 +193,6 @@ int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
193193
}
194194
EXPORT_SYMBOL(rpmsg_sendto);
195195

196-
/**
197-
* rpmsg_send_offchannel() - send a message using explicit src/dst addresses
198-
* @ept: the rpmsg endpoint
199-
* @src: source address
200-
* @dst: destination address
201-
* @data: payload of message
202-
* @len: length of payload
203-
*
204-
* This function sends @data of length @len to the remote @dst address,
205-
* and uses @src as the source address.
206-
* The message will be sent to the remote processor which the @ept
207-
* endpoint belongs to.
208-
* In case there are no TX buffers available, the function will block until
209-
* one becomes available, or a timeout of 15 seconds elapses. When the latter
210-
* happens, -ERESTARTSYS is returned.
211-
*
212-
* Can only be called from process context (for now).
213-
*
214-
* Return: 0 on success and an appropriate error value on failure.
215-
*/
216-
int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
217-
void *data, int len)
218-
{
219-
if (WARN_ON(!ept))
220-
return -EINVAL;
221-
if (!ept->ops->send_offchannel)
222-
return -ENXIO;
223-
224-
return ept->ops->send_offchannel(ept, src, dst, data, len);
225-
}
226-
EXPORT_SYMBOL(rpmsg_send_offchannel);
227-
228196
/**
229197
* rpmsg_trysend() - send a message across to the remote processor
230198
* @ept: the rpmsg endpoint
@@ -301,37 +269,6 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
301269
}
302270
EXPORT_SYMBOL(rpmsg_poll);
303271

304-
/**
305-
* rpmsg_trysend_offchannel() - send a message using explicit src/dst addresses
306-
* @ept: the rpmsg endpoint
307-
* @src: source address
308-
* @dst: destination address
309-
* @data: payload of message
310-
* @len: length of payload
311-
*
312-
* This function sends @data of length @len to the remote @dst address,
313-
* and uses @src as the source address.
314-
* The message will be sent to the remote processor which the @ept
315-
* endpoint belongs to.
316-
* In case there are no TX buffers available, the function will immediately
317-
* return -ENOMEM without waiting until one becomes available.
318-
*
319-
* Can only be called from process context (for now).
320-
*
321-
* Return: 0 on success and an appropriate error value on failure.
322-
*/
323-
int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
324-
void *data, int len)
325-
{
326-
if (WARN_ON(!ept))
327-
return -EINVAL;
328-
if (!ept->ops->trysend_offchannel)
329-
return -ENXIO;
330-
331-
return ept->ops->trysend_offchannel(ept, src, dst, data, len);
332-
}
333-
EXPORT_SYMBOL(rpmsg_trysend_offchannel);
334-
335272
/**
336273
* rpmsg_set_flow_control() - request remote to pause/resume transmission
337274
* @ept: the rpmsg endpoint

include/linux/rpmsg.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,9 @@ struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *,
184184

185185
int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
186186
int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
187-
int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
188-
void *data, int len);
189187

190188
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
191189
int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
192-
int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
193-
void *data, int len);
194190

195191
__poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
196192
poll_table *wait);
@@ -271,15 +267,6 @@ static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
271267

272268
}
273269

274-
static inline int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src,
275-
u32 dst, void *data, int len)
276-
{
277-
/* This shouldn't be possible */
278-
WARN_ON(1);
279-
280-
return -ENXIO;
281-
}
282-
283270
static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
284271
{
285272
/* This shouldn't be possible */
@@ -297,15 +284,6 @@ static inline int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
297284
return -ENXIO;
298285
}
299286

300-
static inline int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src,
301-
u32 dst, void *data, int len)
302-
{
303-
/* This shouldn't be possible */
304-
WARN_ON(1);
305-
306-
return -ENXIO;
307-
}
308-
309287
static inline __poll_t rpmsg_poll(struct rpmsg_endpoint *ept,
310288
struct file *filp, poll_table *wait)
311289
{

0 commit comments

Comments
 (0)