mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: fix MISRA 17.1 in logging functions
MISRA Rule 17.1 forbids use of stdarg.h features which are defined for variable arguments. This patch modifies logging macros to use slogf function for QNX builds. This avoids use of variable argument functions used for formatting log message. Jira NVGPU-4075 Change-Id: I5b6bb1107a7e431afaa960003858193a477b2ee6 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2192016 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
7a62265dde
commit
7c98fbba42
@@ -20,7 +20,7 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <nvgpu/log.h>
|
||||
#include <nvgpu/posix/log.h>
|
||||
#include <nvgpu/types.h>
|
||||
|
||||
#include <nvgpu/gk20a.h>
|
||||
@@ -36,8 +36,6 @@
|
||||
*/
|
||||
#define LOG_FMT "nvgpu: %s %33s:%-4d [%-4s] %s\n"
|
||||
|
||||
u64 nvgpu_dbg_mask = NVGPU_DEFAULT_DBG_MASK;
|
||||
|
||||
static const char *log_types[] = {
|
||||
"ERR",
|
||||
"WRN",
|
||||
@@ -50,11 +48,6 @@ static inline const char *nvgpu_log_name(struct gk20a *g)
|
||||
return "gpu.USS";
|
||||
}
|
||||
|
||||
bool nvgpu_log_mask_enabled(struct gk20a *g, u64 log_mask)
|
||||
{
|
||||
return (g->log_mask & log_mask) != 0ULL;
|
||||
}
|
||||
|
||||
static void __nvgpu_really_print_log(const char *gpu_name,
|
||||
const char *func_name, int line,
|
||||
enum nvgpu_log_type type, const char *log)
|
||||
|
||||
Reference in New Issue
Block a user