From 4277f65834104a0577bff93c937d795940a5576b Mon Sep 17 00:00:00 2001 From: Scott Long Date: Thu, 15 Aug 2019 09:09:47 -0700 Subject: [PATCH] gpu: nvgpu: fix misra 2.7 violations Advisory Rule 2.7 states that there should be no unused parameters in functions. This patch removes unused function parameters from the following: * nvgpu_channel_ctxsw_timeout_debug_dump_state() * nvgpu_channel_destroy() * nvgpu_tsg_destroy() * nvgpu_rc_pdbma_fault() Jira NVGPU-3178 Change-Id: I12ad0d287fd7980533663a9776428ef5d4fd1fb9 Signed-off-by: Scott Long Reviewed-on: https://git-master.nvidia.com/r/2176066 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 12 ++++++------ drivers/gpu/nvgpu/common/fifo/tsg.c | 4 ++-- drivers/gpu/nvgpu/common/rc/rc.c | 3 +-- drivers/gpu/nvgpu/hal/fifo/fifo_intr_gk20a_fusa.c | 3 +-- drivers/gpu/nvgpu/include/nvgpu/rc.h | 3 +-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 055689477..358211110 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -2251,8 +2251,8 @@ void nvgpu_channel_free_usermode_buffers(struct nvgpu_channel *c) } } -static bool nvgpu_channel_ctxsw_timeout_debug_dump_state(struct gk20a *g, - struct nvgpu_channel *ch) +static bool nvgpu_channel_ctxsw_timeout_debug_dump_state( + struct nvgpu_channel *ch) { bool verbose = false; if (nvgpu_is_err_notifier_set(ch, @@ -2282,7 +2282,7 @@ bool nvgpu_channel_mark_error(struct gk20a *g, struct nvgpu_channel *ch) { bool verbose; - verbose = nvgpu_channel_ctxsw_timeout_debug_dump_state(g, ch); + verbose = nvgpu_channel_ctxsw_timeout_debug_dump_state(ch); nvgpu_channel_set_has_timedout_and_wakeup_wqs(g, ch); return verbose; @@ -2375,7 +2375,7 @@ void nvgpu_channel_deterministic_unidle(struct gk20a *g) nvgpu_rwsem_up_write(&g->deterministic_busy); } -static void nvgpu_channel_destroy(struct gk20a *g, struct nvgpu_channel *c) +static void nvgpu_channel_destroy(struct nvgpu_channel *c) { nvgpu_mutex_destroy(&c->ioctl_lock); #ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT @@ -2409,7 +2409,7 @@ void nvgpu_channel_cleanup_sw(struct gk20a *g) nvgpu_channel_kill(ch); } - nvgpu_channel_destroy(g, ch); + nvgpu_channel_destroy(ch); } nvgpu_vfree(g, f->channel); @@ -2498,7 +2498,7 @@ clean_up: for (i = 0; i < chid; i++) { struct nvgpu_channel *ch = &f->channel[i]; - nvgpu_channel_destroy(g, ch); + nvgpu_channel_destroy(ch); } nvgpu_vfree(g, f->channel); f->channel = NULL; diff --git a/drivers/gpu/nvgpu/common/fifo/tsg.c b/drivers/gpu/nvgpu/common/fifo/tsg.c index 29ddf61bd..3f9832572 100644 --- a/drivers/gpu/nvgpu/common/fifo/tsg.c +++ b/drivers/gpu/nvgpu/common/fifo/tsg.c @@ -298,7 +298,7 @@ void nvgpu_tsg_unbind_channel_check_ctx_reload(struct nvgpu_tsg *tsg, } } -static void nvgpu_tsg_destroy(struct gk20a *g, struct nvgpu_tsg *tsg) +static void nvgpu_tsg_destroy(struct nvgpu_tsg *tsg) { nvgpu_mutex_destroy(&tsg->event_id_list_lock); } @@ -332,7 +332,7 @@ void nvgpu_tsg_cleanup_sw(struct gk20a *g) for (tsgid = 0; tsgid < f->num_channels; tsgid++) { struct nvgpu_tsg *tsg = &f->tsg[tsgid]; - nvgpu_tsg_destroy(g, tsg); + nvgpu_tsg_destroy(tsg); } nvgpu_vfree(g, f->tsg); diff --git a/drivers/gpu/nvgpu/common/rc/rc.c b/drivers/gpu/nvgpu/common/rc/rc.c index a048484a6..ec6d07484 100644 --- a/drivers/gpu/nvgpu/common/rc/rc.c +++ b/drivers/gpu/nvgpu/common/rc/rc.c @@ -84,8 +84,7 @@ void nvgpu_rc_ctxsw_timeout(struct gk20a *g, u32 eng_bitmask, #endif } -void nvgpu_rc_pbdma_fault(struct gk20a *g, struct nvgpu_fifo *f, - u32 pbdma_id, u32 error_notifier, +void nvgpu_rc_pbdma_fault(struct gk20a *g, u32 pbdma_id, u32 error_notifier, struct nvgpu_pbdma_status_info *pbdma_status) { #ifdef CONFIG_NVGPU_RECOVERY diff --git a/drivers/gpu/nvgpu/hal/fifo/fifo_intr_gk20a_fusa.c b/drivers/gpu/nvgpu/hal/fifo/fifo_intr_gk20a_fusa.c index c01a47932..69f7c04f5 100644 --- a/drivers/gpu/nvgpu/hal/fifo/fifo_intr_gk20a_fusa.c +++ b/drivers/gpu/nvgpu/hal/fifo/fifo_intr_gk20a_fusa.c @@ -90,7 +90,6 @@ void gk20a_fifo_intr_handle_runlist_event(struct gk20a *g) u32 gk20a_fifo_pbdma_isr(struct gk20a *g) { - struct nvgpu_fifo *f = &g->fifo; u32 pbdma_id; u32 num_pbdma = nvgpu_get_litter_value(g, GPU_LIT_HOST_NUM_PBDMA); u32 pbdma_pending_bitmask = nvgpu_readl(g, fifo_intr_pbdma_id_r()); @@ -105,7 +104,7 @@ u32 gk20a_fifo_pbdma_isr(struct gk20a *g) recover = g->ops.pbdma.handle_intr(g, pbdma_id, &error_notifier, &pbdma_status); if (recover) { - nvgpu_rc_pbdma_fault(g, f, pbdma_id, + nvgpu_rc_pbdma_fault(g, pbdma_id, error_notifier, &pbdma_status); } } diff --git a/drivers/gpu/nvgpu/include/nvgpu/rc.h b/drivers/gpu/nvgpu/include/nvgpu/rc.h index de31c907e..b258954e9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/rc.h +++ b/drivers/gpu/nvgpu/include/nvgpu/rc.h @@ -46,8 +46,7 @@ struct nvgpu_pbdma_status_info; void nvgpu_rc_ctxsw_timeout(struct gk20a *g, u32 eng_bitmask, struct nvgpu_tsg *tsg, bool debug_dump); -void nvgpu_rc_pbdma_fault(struct gk20a *g, struct nvgpu_fifo *f, - u32 pbdma_id, u32 error_notifier, +void nvgpu_rc_pbdma_fault(struct gk20a *g, u32 pbdma_id, u32 error_notifier, struct nvgpu_pbdma_status_info *pbdma_status); void nvgpu_rc_runlist_update(struct gk20a *g, u32 runlist_id);