From 14d99f1575ca34c5d200a85496eb60e9eeef1ed1 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Thu, 28 Sep 2017 17:58:10 +0530 Subject: gpu: nvgpu: change logging enum names Add nvgpu prefix to logging enums. In debug mode QNX, Integrity have already a hashdef DEBUG and it is conflicting with logging enum DEBUG Change-Id: I882e566302842f8b79daf11d5f0850dec222cfea Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/1570193 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/common/linux/log.c | 10 +++++----- drivers/gpu/nvgpu/include/nvgpu/log.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/common/linux/log.c b/drivers/gpu/nvgpu/common/linux/log.c index e2cebee8..f371bb77 100644 --- a/drivers/gpu/nvgpu/common/linux/log.c +++ b/drivers/gpu/nvgpu/common/linux/log.c @@ -82,7 +82,7 @@ static void __nvgpu_really_print_log(u32 trace, const char *gpu_name, const char *log_type = log_types[type]; switch (type) { - case DEBUG: + case NVGPU_DEBUG: /* * We could use pr_debug() here but we control debug enablement * separately from the Linux kernel. Perhaps this is a bug in @@ -90,13 +90,13 @@ static void __nvgpu_really_print_log(u32 trace, const char *gpu_name, */ pr_info(LOG_FMT, name, func_name, line, log_type, log); break; - case INFO: + case NVGPU_INFO: pr_info(LOG_FMT, name, func_name, line, log_type, log); break; - case WARNING: + case NVGPU_WARNING: pr_warn(LOG_FMT, name, func_name, line, log_type, log); break; - case ERROR: + case NVGPU_ERROR: pr_err(LOG_FMT, name, func_name, line, log_type, log); break; } @@ -134,5 +134,5 @@ void __nvgpu_log_dbg(struct gk20a *g, u32 log_mask, va_end(args); __nvgpu_really_print_log(g->log_trace, nvgpu_log_name(g), - func_name, line, DEBUG, log); + func_name, line, NVGPU_DEBUG, log); } diff --git a/drivers/gpu/nvgpu/include/nvgpu/log.h b/drivers/gpu/nvgpu/include/nvgpu/log.h index e0d50f5f..2afddacb 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/log.h +++ b/drivers/gpu/nvgpu/include/nvgpu/log.h @@ -29,10 +29,10 @@ struct gk20a; enum nvgpu_log_type { - ERROR, - WARNING, - DEBUG, - INFO, + NVGPU_ERROR, + NVGPU_WARNING, + NVGPU_DEBUG, + NVGPU_INFO, }; /* @@ -118,7 +118,7 @@ int nvgpu_log_mask_enabled(struct gk20a *g, u32 log_mask); * Uncondtionally print an error message. */ #define nvgpu_err(g, fmt, arg...) \ - __nvgpu_log_msg(g, __func__, __LINE__, ERROR, fmt, ##arg) + __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_ERROR, fmt, ##arg) /** * nvgpu_err - Print a warning @@ -130,7 +130,7 @@ int nvgpu_log_mask_enabled(struct gk20a *g, u32 log_mask); * Uncondtionally print a warming message. */ #define nvgpu_warn(g, fmt, arg...) \ - __nvgpu_log_msg(g, __func__, __LINE__, WARNING, fmt, ##arg) + __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_WARNING, fmt, ##arg) /** * nvgpu_info - Print an info message @@ -142,7 +142,7 @@ int nvgpu_log_mask_enabled(struct gk20a *g, u32 log_mask); * Unconditionally print an information message. */ #define nvgpu_info(g, fmt, arg...) \ - __nvgpu_log_msg(g, __func__, __LINE__, INFO, fmt, ##arg) + __nvgpu_log_msg(g, __func__, __LINE__, NVGPU_INFO, fmt, ##arg) /* * Some convenience macros. @@ -170,7 +170,7 @@ extern u32 nvgpu_dbg_mask; do { \ if (((log_mask) & nvgpu_dbg_mask) != 0) \ __nvgpu_log_msg(NULL, __func__, __LINE__, \ - DEBUG, fmt "\n", ##arg); \ + NVGPU_DEBUG, fmt "\n", ##arg); \ } while (0) /* -- cgit v1.2.2