Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/kmem.c
Scott Long d32692ae24 gpu: nvgpu: fix MISRA Rule 11.6 issue with _THIS_IP_
The use of the _THIS_IP_ macro in nvgpu introduces two separate
MISRA Rule 11.6 violations.

The first is when when the label address (which gcc generates as
a void *) is cast to an unsigned long and the second is when that
unsigned long is cast back to a void * in the timer and kmem code
that track the value.

Skipping the intermediate use of unsigned long eliminates these
violations.  To do this, references to _THIS_IP_ are replaced
with a new (compliant) _NVGPU_GET_IP_ macro.

JIRA NVGPU-895 : MISRA Rule 11.6 violations

Change-Id: I5ea999d8e2b467257fa190b485fa971adcbd0a2b
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774531
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-07-30 19:55:16 -07:00

15 KiB