Skip to content

Commit 68decaf

Browse files
Dr. David Alan Gilbertmathieupoirier
authored andcommitted
rpmsg: virtio: Remove uncallable offchannel functions
The virtio_rpmsg_send_offchannel() and virtio_rpmsg_trysend_offchannel() are wired up to the send_offchannel and trysend_offchannel members of rpmsg_endpoint_ops, the only dereference of those was by the unused, and now removed rpmsg_send_offchannel() and rpmsg_trysend_offchannel() functions. Remove them. 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 20b4f0b commit 68decaf

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

drivers/rpmsg/virtio_rpmsg_bus.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,9 @@ static void virtio_rpmsg_destroy_ept(struct rpmsg_endpoint *ept);
141141
static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
142142
static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
143143
u32 dst);
144-
static int virtio_rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src,
145-
u32 dst, void *data, int len);
146144
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
147145
static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
148146
int len, u32 dst);
149-
static int virtio_rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src,
150-
u32 dst, void *data, int len);
151147
static ssize_t virtio_rpmsg_get_mtu(struct rpmsg_endpoint *ept);
152148
static struct rpmsg_device *__rpmsg_create_channel(struct virtproc_info *vrp,
153149
struct rpmsg_channel_info *chinfo);
@@ -156,10 +152,8 @@ static const struct rpmsg_endpoint_ops virtio_endpoint_ops = {
156152
.destroy_ept = virtio_rpmsg_destroy_ept,
157153
.send = virtio_rpmsg_send,
158154
.sendto = virtio_rpmsg_sendto,
159-
.send_offchannel = virtio_rpmsg_send_offchannel,
160155
.trysend = virtio_rpmsg_trysend,
161156
.trysendto = virtio_rpmsg_trysendto,
162-
.trysend_offchannel = virtio_rpmsg_trysend_offchannel,
163157
.get_mtu = virtio_rpmsg_get_mtu,
164158
};
165159

@@ -545,7 +539,7 @@ static void rpmsg_downref_sleepers(struct virtproc_info *vrp)
545539
* the function will immediately fail, and -ENOMEM will be returned.
546540
*
547541
* Normally drivers shouldn't use this function directly; instead, drivers
548-
* should use the appropriate rpmsg_{try}send{to, _offchannel} API
542+
* should use the appropriate rpmsg_{try}send{to} API
549543
* (see include/linux/rpmsg.h).
550544
*
551545
* Return: 0 on success and an appropriate error value on failure.
@@ -665,14 +659,6 @@ static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
665659
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
666660
}
667661

668-
static int virtio_rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src,
669-
u32 dst, void *data, int len)
670-
{
671-
struct rpmsg_device *rpdev = ept->rpdev;
672-
673-
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
674-
}
675-
676662
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
677663
{
678664
struct rpmsg_device *rpdev = ept->rpdev;
@@ -690,14 +676,6 @@ static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
690676
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false);
691677
}
692678

693-
static int virtio_rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src,
694-
u32 dst, void *data, int len)
695-
{
696-
struct rpmsg_device *rpdev = ept->rpdev;
697-
698-
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false);
699-
}
700-
701679
static ssize_t virtio_rpmsg_get_mtu(struct rpmsg_endpoint *ept)
702680
{
703681
struct rpmsg_device *rpdev = ept->rpdev;

0 commit comments

Comments
 (0)