From ce6fc269a1aa9c7655943f52b5fa7fa6b67083f4 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Tue, 10 Dec 2019 18:10:56 -0500 Subject: [PATCH] gpu: nvgpu: compile out unreachable code in unit testing Make use of the POSIX flag to compile out a BPMP-related print that cannot occur in posix builds. JIRA NVGPU-932 Change-Id: I4373b9d0d486316dbae3a555f6887361ec54ea29 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2259665 Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/hal/fb/fb_gv11b_fusa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/fb/fb_gv11b_fusa.c b/drivers/gpu/nvgpu/hal/fb/fb_gv11b_fusa.c index 81c60846b..20b18cedb 100644 --- a/drivers/gpu/nvgpu/hal/fb/fb_gv11b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fb/fb_gv11b_fusa.c @@ -48,15 +48,15 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g) { +#ifndef __NVGPU_POSIX__ if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) { nvgpu_log(g, gpu_dbg_info, "nvlink soc credits init done by bpmp"); } else { -#ifndef __NVGPU_POSIX__ #ifdef CONFIG_NVGPU_NVLINK nvgpu_mss_nvlink_init_credits(g); -#endif #endif } +#endif } static void gv11b_fb_set_atomic_mode(struct gk20a *g)