diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-11-29 18:48:10 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-25 17:24:42 -0500 |
commit | b46045f3fe71fad703ee7d689657af16925d78ca (patch) | |
tree | 47a1e4231f84c2bb5db3dabf79c7b2b1eeb817be /drivers/gpu/nvgpu/include/nvgpu | |
parent | 99e808567ca358e0e6d03f4731b81854070266a3 (diff) |
gpu: nvgpu: Cleanup '\n' usage in allocator debugging
These '\n' were leftover from the previous debugging macro usage
which did no add the '\n' automagically. However, once swapped over
to the nvgpu logging system the '\n' is added and no longer needs
to be present in the code.
This did require one extra modification though to keep things
consistent. The __alloc_pstat() macro, used for sending output
either to a seq_file or the terminal, needed to add the '\n' for
seq_printf() calls and the '\n' had to be deleted in the C files.
Change-Id: I4d56317fe2a87bd00033cfe79d06ffc048d91049
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1613641
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/allocator.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/allocator.h b/drivers/gpu/nvgpu/include/nvgpu/allocator.h index 1e7ab38f..2ff7e950 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/allocator.h +++ b/drivers/gpu/nvgpu/include/nvgpu/allocator.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <nvgpu/list.h> | 37 | #include <nvgpu/list.h> |
38 | #include <nvgpu/types.h> | 38 | #include <nvgpu/types.h> |
39 | 39 | ||
40 | /* #define ALLOCATOR_DEBUG */ | 40 | /* #define ALLOCATOR_DEBUG_FINE */ |
41 | 41 | ||
42 | struct nvgpu_allocator; | 42 | struct nvgpu_allocator; |
43 | struct nvgpu_alloc_carveout; | 43 | struct nvgpu_alloc_carveout; |
@@ -300,7 +300,7 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a) | |||
300 | #define __alloc_pstat(seq, allocator, fmt, arg...) \ | 300 | #define __alloc_pstat(seq, allocator, fmt, arg...) \ |
301 | do { \ | 301 | do { \ |
302 | if (seq) \ | 302 | if (seq) \ |
303 | seq_printf(seq, fmt, ##arg); \ | 303 | seq_printf(seq, fmt "\n", ##arg); \ |
304 | else \ | 304 | else \ |
305 | alloc_dbg(allocator, fmt, ##arg); \ | 305 | alloc_dbg(allocator, fmt, ##arg); \ |
306 | } while (0) | 306 | } while (0) |
@@ -311,14 +311,14 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a) | |||
311 | 311 | ||
312 | /* | 312 | /* |
313 | * This gives finer control over debugging messages. By defining the | 313 | * This gives finer control over debugging messages. By defining the |
314 | * ALLOCATOR_DEBUG macro prints for an allocator will only get made if | 314 | * ALLOCATOR_DEBUG_FINE macro prints for an allocator will only get made if |
315 | * that allocator's debug flag is set. | 315 | * that allocator's debug flag is set. |
316 | * | 316 | * |
317 | * Otherwise debugging is as normal: debug statements for all allocators | 317 | * Otherwise debugging is as normal: debug statements for all allocators |
318 | * if the GPU debugging mask bit is set. Note: even when ALLOCATOR_DEBUG | 318 | * if the GPU debugging mask bit is set. Note: even when ALLOCATOR_DEBUG_FINE |
319 | * is set gpu_dbg_alloc must still also be set to true. | 319 | * is set gpu_dbg_alloc must still also be set to true. |
320 | */ | 320 | */ |
321 | #if defined(ALLOCATOR_DEBUG) | 321 | #if defined(ALLOCATOR_DEBUG_FINE) |
322 | #define alloc_dbg(a, fmt, arg...) \ | 322 | #define alloc_dbg(a, fmt, arg...) \ |
323 | do { \ | 323 | do { \ |
324 | if ((a)->debug) \ | 324 | if ((a)->debug) \ |