lkml.org 
[lkml]   [2019]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 4/7] slub: Add comments to endif pre-processor macros
Date
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@linux.com>
> Signed-off-by: Tobin C. Harding <tobin@kernel.org>

Reviewed-by: Roman Gushchin <guro@fb.com>

\
 
 \ /
  Last update: 2019-04-03 20:43    [W:0.172 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site