On 2019-12-04, Petr Mladek <pmladek@xxxxxxxx> wrote: >> + } else if ((DATA_WRAPS(data_ring, blk_lpos->begin) + 1 == >> + DATA_WRAPS(data_ring, blk_lpos->next)) || >> + ((DATA_WRAPS(data_ring, blk_lpos->begin) == >> + DATA_WRAPS(data_ring, -1UL)) && >> + (DATA_WRAPS(data_ring, blk_lpos->next) == 0))) { > > I wonder if the following might be easier to understand even for > people like me ;-) > > } else if (DATA_WRAPS(data_ring, blk_lpos->begin + DATA_SIZE(data_ring)) == > DATA_WRAPS(data_ring, blk_lpos->next)) { Yes, this is clear and covers both cases. Thanks. John _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec