From 858905aeae18f515f67745e7e4df408e080902ca Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Tue, 14 Jan 2020 13:18:58 -0800 Subject: [PATCH] gpu: nvgpu: fifo: remove runlist.c dead code Currenly, nvgpu_runlist_cleanup_sw() includes a condition to check if nvgpu_fifo struct in GPU structure is NULL. However, as nvgpu_fifo is not included as a nvgpu_fifo pointer, it is not possible to set nvgpu_fifo member as NULL. So, this patch deletes this condition. Jira NVGPU-4817 Change-Id: I3484f74064450ad031bfa0beea9bbd1a49165f72 Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279112 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Thomas Fleury GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/runlist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/runlist.c b/drivers/gpu/nvgpu/common/fifo/runlist.c index 9988dd156..cfb177cec 100644 --- a/drivers/gpu/nvgpu/common/fifo/runlist.c +++ b/drivers/gpu/nvgpu/common/fifo/runlist.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -648,8 +648,7 @@ void nvgpu_runlist_cleanup_sw(struct gk20a *g) u32 i, j; struct nvgpu_runlist_info *runlist; - if ((f == NULL) || (f->runlist_info == NULL) || - (f->active_runlist_info == NULL)) { + if ((f->runlist_info == NULL) || (f->active_runlist_info == NULL)) { return; }