[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 17/21] xen/arm: refactor vpl011_data_avail

Hi Stefano,

On 07/07/18 00:12, Stefano Stabellini wrote:
Move the code to calculate in_fifo_level and out_fifo_level out of
vpl011_data_avail, to the caller.
This change will make it possible to reuse vpl011_data_avail with
different ring structures in a later patch.

Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>

Changes in v2:
- new patch
  xen/arch/arm/vpl011.c | 70 ++++++++++++++++++++++++++++++---------------------
  1 file changed, 42 insertions(+), 28 deletions(-)

diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c
index 33fcaa0..e75957f 100644
--- a/xen/arch/arm/vpl011.c
+++ b/xen/arch/arm/vpl011.c
@@ -34,6 +34,12 @@
  #include <asm/vgic-emul.h>
  #include <asm/vpl011.h>
+static void vpl011_data_avail(struct domain *d,
+                              XENCONS_RING_IDX in_fifo_level,
+                              XENCONS_RING_IDX in_size,
+                              XENCONS_RING_IDX out_fifo_level,
+                              XENCONS_RING_IDX out_size);

Looking at the end code, I think you can avoid the declaration by adding vpl011_rx_char somewhere else.


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.