Messages in this thread | | | From | Roman Gushchin <> | Subject | Re: [PATCH v5 4/7] slub: Add comments to endif pre-processor macros | Date | Wed, 3 Apr 2019 18:42:27 +0000 |
| |
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>
| |