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:
Vedashree Vidwans
2019-10-03 16:37:57 -07:00
committed by Alex Waterman
parent 7a62265dde
commit 7c98fbba42
16 changed files with 282 additions and 139 deletions

View File

@@ -17,7 +17,7 @@
#include <linux/kernel.h>
#include <linux/device.h>
#include <nvgpu/log.h>
#include <nvgpu/linux/log.h>
#include <nvgpu/gk20a.h>
#include "platform_gk20a.h"
@@ -45,11 +45,6 @@ static const char *log_types[] = {
"INFO",
};
bool nvgpu_log_mask_enabled(struct gk20a *g, u64 log_mask)
{
return (g->log_mask & log_mask) != 0ULL;
}
static inline const char *nvgpu_log_name(struct gk20a *g)
{
return dev_name(dev_from_gk20a(g));