Re: [PATCH 0/2] be more generous with ptrlist repacking

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

 



On Thu, Nov 17, 2016 at 9:25 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> The macros that do the ptrlist walking don't handle empty blocks.

Actually, most of the_do_ handle empty blocks. In particular, the
normal FOR_EACH_PTR() case should handle it just fine.

The exception is, I think:

 - first_ptr_list/last_ptr_list

 - DO_PREPARE/DO_RESET

which just don't walk the pointer block list, they just end up blindly doing

        PTR_ENTRY(list, 0);

for the first entry, or

        list = list->prev;
        PTR_ENTRY(list, list->nr-1);

for the last one.

I suspect they should be fairly easy to update to just walk the list
until they hit a non-empty case (like DO_NEXT() already does, for
example).

              Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux