diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-22 10:58:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-22 10:58:15 -0700 |
commit | 379bb045171dea3e2ee01b32fe88f2afe1fe2fa8 (patch) | |
tree | 9f885797fc85b03ae6dc366faf78a5f8888af34e | |
parent | 28de978ba346f4d5baee4e59841b473a7ff38f0d (diff) | |
parent | 9fe69a725e238ac279027f0132e50617a63b847d (diff) |
Merge tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
Pull rpmsg updates from Bjorn Andersson:
"This contains updates to make the rpmsg sample driver more useful,
fixes the naming of GLINK devices to avoid naming collisions and a few
minor bug fixes. It also updates MAINTAINERS to reflect the move to
kernel.org"
* tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
rpmsg: glink-smem: Name the edge based on parent remoteproc
rpmsg: glink: Use struct_size() helper
rpmsg: virtio_rpmsg_bus: replace "%p" with "%pK"
MAINTAINERS: rpmsg: fix git tree location
rpmsg: core: fix comments
samples/rpmsg: Introduce a module parameter for message count
samples/rpmsg: Replace print_hex_dump() with print_hex_dump_debug()
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/rpmsg/qcom_glink_native.c | 2 | ||||
-rw-r--r-- | drivers/rpmsg/qcom_glink_smem.c | 2 | ||||
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 8 | ||||
-rw-r--r-- | drivers/rpmsg/rpmsg_internal.h | 5 | ||||
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 2 | ||||
-rw-r--r-- | samples/rpmsg/rpmsg_client_sample.c | 10 |
7 files changed, 17 insertions, 14 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index a55cf81153d4..8d37ef157e85 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13761,7 +13761,7 @@ REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM M: Ohad Ben-Cohen <ohad@wizery.com> M: Bjorn Andersson <bjorn.andersson@linaro.org> L: linux-remoteproc@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rpmsg-next S: Maintained F: drivers/rpmsg/ F: Documentation/rpmsg.txt diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index f46c787733e8..621f1afd4d6b 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -892,7 +892,7 @@ static void qcom_glink_handle_intent(struct qcom_glink *glink, struct intent_pair intents[]; } __packed * msg; - const size_t msglen = sizeof(*msg) + sizeof(struct intent_pair) * count; + const size_t msglen = struct_size(msg, intents, count); int ret; int i; unsigned long flags; diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c index 64a5ce324c7f..4238383d8685 100644 --- a/drivers/rpmsg/qcom_glink_smem.c +++ b/drivers/rpmsg/qcom_glink_smem.c @@ -201,7 +201,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent, dev->parent = parent; dev->of_node = node; dev->release = qcom_glink_smem_release; - dev_set_name(dev, "%pOFn:%pOFn", node->parent, node); + dev_set_name(dev, "%s:%pOFn", dev_name(parent->parent), node); ret = device_register(dev); if (ret) { pr_err("failed to register glink edge\n"); diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index ea88fd4e2a6e..e330ec4dfc33 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -46,7 +46,7 @@ * equals to the src address of their rpmsg channel), the driver's handler * is invoked to process it. * - * That said, more complicated drivers might do need to allocate + * That said, more complicated drivers might need to allocate * additional rpmsg addresses, and bind them to different rx callbacks. * To accomplish that, those drivers need to call this function. * @@ -177,7 +177,7 @@ int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, EXPORT_SYMBOL(rpmsg_send_offchannel); /** - * rpmsg_send() - send a message across to the remote processor + * rpmsg_trysend() - send a message across to the remote processor * @ept: the rpmsg endpoint * @data: payload of message * @len: length of payload @@ -205,7 +205,7 @@ int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len) EXPORT_SYMBOL(rpmsg_trysend); /** - * rpmsg_sendto() - send a message across to the remote processor, specify dst + * rpmsg_trysendto() - send a message across to the remote processor, specify dst * @ept: the rpmsg endpoint * @data: payload of message * @len: length of payload @@ -253,7 +253,7 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, EXPORT_SYMBOL(rpmsg_poll); /** - * rpmsg_send_offchannel() - send a message using explicit src/dst addresses + * rpmsg_trysend_offchannel() - send a message using explicit src/dst addresses * @ept: the rpmsg endpoint * @src: source address * @dst: destination address diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h index 0d791c30b7ea..3fc83cd50e98 100644 --- a/drivers/rpmsg/rpmsg_internal.h +++ b/drivers/rpmsg/rpmsg_internal.h @@ -20,7 +20,7 @@ /** * struct rpmsg_device_ops - indirection table for the rpmsg_device operations - * @create_ept: create backend-specific endpoint, requried + * @create_ept: create backend-specific endpoint, required * @announce_create: announce presence of new channel, optional * @announce_destroy: announce destruction of channel, optional * @@ -39,13 +39,14 @@ struct rpmsg_device_ops { /** * struct rpmsg_endpoint_ops - indirection table for rpmsg_endpoint operations - * @destroy_ept: destroy the given endpoint, required + * @destroy_ept: see @rpmsg_destroy_ept(), required * @send: see @rpmsg_send(), required * @sendto: see @rpmsg_sendto(), optional * @send_offchannel: see @rpmsg_send_offchannel(), optional * @trysend: see @rpmsg_trysend(), required * @trysendto: see @rpmsg_trysendto(), optional * @trysend_offchannel: see @rpmsg_trysend_offchannel(), optional + * @poll: see @rpmsg_poll(), optional * * Indirection table for the operations that a rpmsg backend should implement. * In addition to @destroy_ept, the backend must at least implement @send and diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 5d3685bd76a2..376ebbf880d6 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -920,7 +920,7 @@ static int rpmsg_probe(struct virtio_device *vdev) goto vqs_del; } - dev_dbg(&vdev->dev, "buffers: va %p, dma %pad\n", + dev_dbg(&vdev->dev, "buffers: va %pK, dma %pad\n", bufs_va, &vrp->bufs_dma); /* half of the buffers is dedicated for RX */ diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index 2a0695573b47..ae5081662283 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -14,7 +14,9 @@ #include <linux/rpmsg.h> #define MSG "hello world!" -#define MSG_LIMIT 100 + +static int count = 100; +module_param(count, int, 0644); struct instance_data { int rx_count; @@ -29,11 +31,11 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n", ++idata->rx_count, src); - print_hex_dump(KERN_DEBUG, __func__, DUMP_PREFIX_NONE, 16, 1, - data, len, true); + print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len, + true); /* samples should not live forever */ - if (idata->rx_count >= MSG_LIMIT) { + if (idata->rx_count >= count) { dev_info(&rpdev->dev, "goodbye!\n"); return 0; } |