Re: [PATCH v5 4/7] slub: Add comments to endif pre-processor macros

From: Roman Gushchin
Date: Wed Apr 03 2019 - 14:42:48 EST


On Wed, Apr 03, 2019 at 10:05:42AM +1100, Tobin C. Harding wrote:
> SLUB allocator makes heavy use of ifdef/endif pre-processor macros.
> The pairing of these statements is at times hard to follow e.g. if the
> pair are further than a screen apart or if there are nested pairs. We
> can reduce cognitive load by adding a comment to the endif statement of
> form
>
> #ifdef CONFIG_FOO
> ...
> #endif /* CONFIG_FOO */
>
> Add comments to endif pre-processor macros if ifdef/endif pair is not
> immediately apparent.
>
> Acked-by: Christoph Lameter <cl@xxxxxxxxx>
> Signed-off-by: Tobin C. Harding <tobin@xxxxxxxxxx>

Reviewed-by: Roman Gushchin <guro@xxxxxx>