diff options
author | 2020-06-29 17:09:08 +0200 | |
---|---|---|
committer | 2020-07-01 15:47:03 +0200 | |
commit | b5f1547b6e3bddbbac263a1c7adfb51427a57a2c (patch) | |
tree | 9e7e010c42da65445ad9631d9c7b0c962e2c59c1 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | |
parent | staging: vchi: Get rid of all useless callback reasons (diff) | |
download | linux-dev-b5f1547b6e3bddbbac263a1c7adfb51427a57a2c.tar.xz linux-dev-b5f1547b6e3bddbbac263a1c7adfb51427a57a2c.zip |
staging: vchi: Get rid of vchi_msg_peek()
There already is a function that covers most of the functionality
vchi_msg_peek() provides: vchi_msg_hold(). The main difference being
that the later removes the message from vchu's queue while the other
does it later on, while releasing the message.
There are no users of this function that can't be trivially converted to
vchi_msg_hold(). So, for the sake of removing duplicate code, get rid of
vchi_msg_peek().
Note that the opposite change could be performed as well. But
vchi_msg_peek()'s implementation was deemed less robust as messages have
to be released in order.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-11-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c index 644844d88fed..c1c81f9ab9e6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -55,18 +55,6 @@ void vchiu_queue_push(struct vchiu_queue *queue, struct vchiq_header *header) complete(&queue->push); } -struct vchiq_header *vchiu_queue_peek(struct vchiu_queue *queue) -{ - while (queue->write == queue->read) { - if (wait_for_completion_interruptible(&queue->push)) - flush_signals(current); - } - - complete(&queue->push); // We haven't removed anything from the queue. - - return queue->storage[queue->read & (queue->size - 1)]; -} - struct vchiq_header *vchiu_queue_pop(struct vchiu_queue *queue) { struct vchiq_header *header; |