Re: [PATCH] kernel.h: Add for_each_if()

2018-07-17 Thread NeilBrown
On Mon, Jul 16 2018, Andy Shevchenko wrote: > On Fri, 2018-07-13 at 16:42 -0700, Randy Dunlap wrote: >> On 07/13/2018 04:37 PM, NeilBrown wrote: > >> >> coding-style.rst says: >> Also, use braces when a loop contains more than a single simple >> statement:

Re: [PATCH] kernel.h: Add for_each_if()

2018-07-15 Thread NeilBrown
but I do think that the macros should be fixed and maybe this is the path-of-least-resistance to getting it done. Thanks, NeilBrown signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] kernel.h: Add for_each_if()

2018-07-11 Thread NeilBrown
for_each_" causes the body to loop. This one doesn't. If someone doesn't know what for_each_if() does and sees it in code, they are unlikely to jump to the right conclusion. I would suggest that "__if" would be a better choice. I think most people would guess that means "like