On Fri, Aug 4, 2017 at 5:03 PM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: >> I am not sure we are on the same page. Only 2 macro need to be updated: >> DO_FOR_EACH_PTR, DO_FOR_EACH_REVERSE. > > It's not for the number of macros defined. > It's about the code size & the run-time effect on the iteration of > the other lists. It seems simple enough but it would add two load-test-branch Because the rm is near the nr, which get visit every loop iteration. >From cache line point of view, the ptrlist->rm will not cause extra cache load. The second test and load will not matter for most of the ptrlist any way. I am willing to bet even my test-ptrlist benchmark will not see much a difference. > to every such macro invocation and these macros are already quite heavy. The flip side is if some one forget to check that, it will be very bad. How do you make sure you add the check to every single one of the loop iterator? I can take patch as it is. It is only a suggestion. No deal breaker. Chris -- 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