diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-21 15:42:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-24 14:05:17 -0400 |
commit | b3e1ce04b963e91b9b425b3c35cc4eff11db7543 (patch) | |
tree | 73c45d0acfe3ce25298ba1dc8dfa4777e02c861a /drivers/gpu/nvgpu/common/mm/buddy_allocator.c | |
parent | b88c9ad793cb9822f359b8c498afe872c412959c (diff) |
gpu: nvgpu: Put debugfs dependencies inside #ifdef
Put all debugfs dependencies inside #ifdef CONFIG_DEBUG_FS. This
includes some functions in allocators that were used only for
debugging.
Remove include of linux/debugfs.h on files that do not deal with
debugfs.
linux/debugfs.h implicitly included linux/fs.h, which we relied on.
Add explicit include of linux/fs.h for all files where this is the
case.
Change-Id: I16feffae6b0e3a2edf366075cdc01ade86be06f9
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1467897
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/buddy_allocator.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/buddy_allocator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c index 44e8edb2..34bc51df 100644 --- a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c | |||
@@ -1086,6 +1086,7 @@ static u64 nvgpu_buddy_alloc_space(struct nvgpu_allocator *a) | |||
1086 | return space; | 1086 | return space; |
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | #ifdef CONFIG_DEBUG_FS | ||
1089 | /* | 1090 | /* |
1090 | * Print the buddy allocator top level stats. If you pass @s as NULL then the | 1091 | * Print the buddy allocator top level stats. If you pass @s as NULL then the |
1091 | * stats are printed to the kernel log. This lets this code be used for | 1092 | * stats are printed to the kernel log. This lets this code be used for |
@@ -1163,6 +1164,7 @@ static void nvgpu_buddy_print_stats(struct nvgpu_allocator *__a, | |||
1163 | if (lock) | 1164 | if (lock) |
1164 | alloc_unlock(__a); | 1165 | alloc_unlock(__a); |
1165 | } | 1166 | } |
1167 | #endif | ||
1166 | 1168 | ||
1167 | static const struct nvgpu_allocator_ops buddy_ops = { | 1169 | static const struct nvgpu_allocator_ops buddy_ops = { |
1168 | .alloc = nvgpu_buddy_balloc, | 1170 | .alloc = nvgpu_buddy_balloc, |
@@ -1182,7 +1184,9 @@ static const struct nvgpu_allocator_ops buddy_ops = { | |||
1182 | 1184 | ||
1183 | .fini = nvgpu_buddy_allocator_destroy, | 1185 | .fini = nvgpu_buddy_allocator_destroy, |
1184 | 1186 | ||
1187 | #ifdef CONFIG_DEBUG_FS | ||
1185 | .print_stats = nvgpu_buddy_print_stats, | 1188 | .print_stats = nvgpu_buddy_print_stats, |
1189 | #endif | ||
1186 | }; | 1190 | }; |
1187 | 1191 | ||
1188 | /* | 1192 | /* |