gpu: nvgpu: add coverity whitelisting support

Add macros for whitelisting coverity violations. These macros use pragma
directives. The pragma directives and whitelisting macros are only
enabled when a coverity scan is being run.

The whitelisting macros have been added to a new header called
static_analysis.h. The contents of safe_ops.h (CERT C safe ops) have
been moved into static_analysis.h because this will be the new header
for static analysis related macros/defines/etc.

JIRA NVGPU-3820

Change-Id: I9c63f20f670880b420415535738034619314b7c3
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2180600
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Adeel Raza
2019-08-23 13:28:11 -07:00
committed by Alex Waterman
parent ff4610e910
commit 252ddc4f05
299 changed files with 398 additions and 299 deletions

View File

@@ -27,7 +27,7 @@
#include <nvgpu/hal_init.h>
#include <nvgpu/mc.h>
#include <nvgpu/soc.h>
#include <nvgpu/safe_ops.h>
#include <nvgpu/static_analysis.h>
#include "hal_gm20b.h"
#include "hal_gp10b.h"