From f99a75913d4874639dc0ef17a4d8d6d49ad5b081 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Thu, 18 Apr 2019 13:50:45 -0400 Subject: [PATCH] gpu: nvgpu: change gk20a_gr_debug_dump to return void MISRA Rule-17.7 requires the return value of all functions to be used. Fix is either to use the return value or change the function to return void. In the case of the gk20a_gr_debug_dump function, it was always returning 0, so this patch changes the signature to return void instead. JIRA NVGPU-3153 Change-Id: I90173ba4e74fe045d9d6a819889d443f8423f34e Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2100651 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/debug.h | 4 ++-- drivers/gpu/nvgpu/os/linux/debug.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/debug.h b/drivers/gpu/nvgpu/include/nvgpu/debug.h index 167fb2934..b66d268b6 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/debug.h +++ b/drivers/gpu/nvgpu/include/nvgpu/debug.h @@ -45,7 +45,7 @@ void gk20a_debug_output(struct gk20a_debug_output *o, void gk20a_debug_dump(struct gk20a *g); void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o); -int gk20a_gr_debug_dump(struct gk20a *g); +void gk20a_gr_debug_dump(struct gk20a *g); void gk20a_init_debug_ops(struct gpu_ops *gops); void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink); @@ -57,7 +57,7 @@ static inline void gk20a_debug_output(struct gk20a_debug_output *o, static inline void gk20a_debug_dump(struct gk20a *g) {} static inline void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o) {} -static inline int gk20a_gr_debug_dump(struct gk20a *g) { return 0;} +static inline void gk20a_gr_debug_dump(struct gk20a *g) {} static inline void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) {} static inline void gk20a_debug_deinit(struct gk20a *g) {} #endif diff --git a/drivers/gpu/nvgpu/os/linux/debug.c b/drivers/gpu/nvgpu/os/linux/debug.c index 5f8e03414..533e083b0 100644 --- a/drivers/gpu/nvgpu/os/linux/debug.c +++ b/drivers/gpu/nvgpu/os/linux/debug.c @@ -79,7 +79,7 @@ static int gk20a_gr_dump_regs(struct gk20a *g, return 0; } -int gk20a_gr_debug_dump(struct gk20a *g) +void gk20a_gr_debug_dump(struct gk20a *g) { struct gk20a_debug_output o = { .fn = gk20a_debug_write_printk, @@ -87,8 +87,6 @@ int gk20a_gr_debug_dump(struct gk20a *g) }; gk20a_gr_dump_regs(g, &o); - - return 0; } static int gk20a_gr_debug_show(struct seq_file *s, void *unused)