[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load |
Date: |
Thu, 27 Nov 2014 12:04:03 +0100 |
Hi,
> > + evt = s->ptr.queue[(s->head+s->n) & QUEUE_MASK];
>
> s->n is QUEUE_LENGTH, can we directly delete it?
> evt = s->ptr.queue[s->head & QUEUE_MASK]
I prefer to make clear in the code that we want the last ring element
not the first and leave in the "+n", even if we could take it out.
cheers,
Gerd