From 6e83701982cbd10a5d6b3091ff38c48d87c8057a Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 1 May 2019 14:31:20 -0700 Subject: [PATCH] gpu: nvgpu: runlist MISRA fixes for Rule 15.7 All "if(expr) else if" constructs shall be terminated with an else statement. Re-factored checks to avoid "else if" statement. Jira NVGPU-3379 Change-Id: Idf8a80a3f314fcf3f3b7a0c6f01bbb9d2202bdf2 Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/2109683 GVS: Gerrit_Virtual_Submit Reviewed-by: Philip Elcan Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/runlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/runlist.c b/drivers/gpu/nvgpu/common/fifo/runlist.c index b12351a64..202b02244 100644 --- a/drivers/gpu/nvgpu/common/fifo/runlist.c +++ b/drivers/gpu/nvgpu/common/fifo/runlist.c @@ -431,8 +431,10 @@ int nvgpu_runlist_update_locked(struct gk20a *g, u32 runlist_id, /* trigger runlist update timeout recovery */ return ret; - } else if (ret == -EINTR) { - nvgpu_err(g, "runlist update interrupted"); + } else { + if (ret == -EINTR) { + nvgpu_err(g, "runlist update interrupted"); + } } }