From b46045f3fe71fad703ee7d689657af16925d78ca Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 29 Nov 2017 23:48:10 +0000 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1613641 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/allocator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/include') 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 @@ #include #include -/* #define ALLOCATOR_DEBUG */ +/* #define ALLOCATOR_DEBUG_FINE */ struct nvgpu_allocator; struct nvgpu_alloc_carveout; @@ -300,7 +300,7 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a) #define __alloc_pstat(seq, allocator, fmt, arg...) \ do { \ if (seq) \ - seq_printf(seq, fmt, ##arg); \ + seq_printf(seq, fmt "\n", ##arg); \ else \ alloc_dbg(allocator, fmt, ##arg); \ } while (0) @@ -311,14 +311,14 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a) /* * This gives finer control over debugging messages. By defining the - * ALLOCATOR_DEBUG macro prints for an allocator will only get made if + * ALLOCATOR_DEBUG_FINE macro prints for an allocator will only get made if * that allocator's debug flag is set. * * Otherwise debugging is as normal: debug statements for all allocators - * if the GPU debugging mask bit is set. Note: even when ALLOCATOR_DEBUG + * if the GPU debugging mask bit is set. Note: even when ALLOCATOR_DEBUG_FINE * is set gpu_dbg_alloc must still also be set to true. */ -#if defined(ALLOCATOR_DEBUG) +#if defined(ALLOCATOR_DEBUG_FINE) #define alloc_dbg(a, fmt, arg...) \ do { \ if ((a)->debug) \ -- cgit v1.2.2