From a68f66d307707d10ca4cddb4c8df0d8ce624f30d Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Tue, 30 Apr 2019 10:15:48 -0700 Subject: [PATCH] gpu: nvgpu: userd MISRA fix for Rule 8.6 When NVGPU_USERD is undefined, nvgpu_userd_free_slabs and nvgpu_userd_init_slabs are declared but never defined. Fixed MISRA Rule 8.6 with #ifdef NVGPU_USERD directive. Jira NVGPU-3260 Change-Id: Id9e8a7e0aed069ad8d56536e4637d0f9529b34a4 Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/2108848 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/fifo/userd.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/fifo/userd.h b/drivers/gpu/nvgpu/include/nvgpu/fifo/userd.h index 99a48ea07..4d1fa4fce 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/fifo/userd.h +++ b/drivers/gpu/nvgpu/include/nvgpu/fifo/userd.h @@ -30,8 +30,11 @@ struct channel_gk20a; int nvgpu_userd_setup_sw(struct gk20a *g); void nvgpu_userd_cleanup_sw(struct gk20a *g); -int nvgpu_userd_init_slabs(struct gk20a *g); -void nvgpu_userd_free_slabs(struct gk20a *g); int nvgpu_userd_init_channel(struct gk20a *g, struct channel_gk20a *c); +#ifdef NVGPU_USERD +int nvgpu_userd_init_slabs(struct gk20a *g); +void nvgpu_userd_free_slabs(struct gk20a *g); +#endif + #endif /* NVGPU_FIFO_USERD_H */