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

@@ -68,6 +68,12 @@ ecc:
include/nvgpu/ecc.h ]
deps:
log:
safe: yes
owner: Vedashree V
sources: [ common/log_common.c ]
deps:
# Pretty sure this can be marked as not-safe since we plan to use
# usermode submits in the safety build.
fence:
@@ -203,8 +209,7 @@ utils:
common/utils/string.c,
common/utils/worker.c,
common/utils/rbtree.c,
common/utils/enabled.c,
common/utils/assert.c ]
common/utils/enabled.c ]
##
## Common elements.

View File

@@ -76,7 +76,7 @@ lock:
log:
safe: yes
sources: [ include/nvgpu/log.h ]
sources: [ include/nvgpu/log.h, include/nvgpu/log_common.h ]
log2:
safe: yes

View File

@@ -234,6 +234,7 @@ headers:
include/nvgpu/linux/sim.h,
include/nvgpu/linux/sim_pci.h,
include/nvgpu/linux/thread.h,
include/nvgpu/linux/log.h,
include/nvgpu/linux/vm.h ]
# An extra unit to lump all the unclassified Linux files.

View File

@@ -43,6 +43,7 @@ headers:
include/nvgpu/posix/circ_buf.h,
include/nvgpu/posix/dma.h,
include/nvgpu/posix/io.h,
include/nvgpu/posix/log.h,
include/nvgpu/posix/log2.h,
include/nvgpu/posix/nvgpu_mem.h,
include/nvgpu/posix/pci.h,