gpu: nvgpu: Use config in makefile for debug_kmem.c

Conditionally compile debug_kmem.c in the Makefile since the entire
file is not needed when CONFIG_NVGPU_TRACK_KMEM_USAGE is not enabled.
Removing as many conditional compilation flags from the C code itself
is highly desirable from a code complexity standard.

Change-Id: If1e87986ca1ee6d71485f1ab40f10c1645c1a628
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1576543
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2017-10-10 11:28:03 -07:00
committed by mobile promotions
parent 57fb527a7e
commit 2ecd18902e
2 changed files with 5 additions and 3 deletions

View File

@@ -18,7 +18,6 @@
#include "debug_kmem.h"
#include "kmem_priv.h"
#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE
/**
* to_human_readable_bytes - Determine suffix for passed size.
*
@@ -311,4 +310,3 @@ void nvgpu_kmem_debugfs_init(struct gk20a *g)
l->debugfs_kmem,
g, &__kmem_traces_fops);
}
#endif