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

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

 



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>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux