From f80d2a01f4384d3cc6675d4313ed690445e75b7b Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Mon, 3 Dec 2018 16:56:46 -0500 Subject: [PATCH] gpu: nvgpu: clean MISRA 17.7 in pd_cache.c MISRA Rule-17.7 requires the return value of all functions to be used. Fix is either to use the return value or change the function to return void. This patch contains fixes for all 17.7 violations in pd_cache.c JIRA NVGPU-677. Change-Id: Idd5534ce82107071a1d47250f87e6a1046989433 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/1964639 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c b/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c index 5a18e7cef..7a7f56b92 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu/pd_cache.c @@ -213,8 +213,8 @@ void nvgpu_pd_cache_fini(struct gk20a *g) } for (i = 0U; i < NVGPU_PD_CACHE_COUNT; i++) { - WARN_ON(!nvgpu_list_empty(&cache->full[i])); - WARN_ON(!nvgpu_list_empty(&cache->partial[i])); + (void) WARN_ON(!nvgpu_list_empty(&cache->full[i])); + (void) WARN_ON(!nvgpu_list_empty(&cache->partial[i])); } nvgpu_kfree(g, g->mm.pd_cache);