From 010cd8510b41ed154720e0c440e1ccdb6d86e239 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Fri, 31 Aug 2018 11:46:00 -0400 Subject: gpu: nvgpu: Fix __nvgpu_set_enabled MISRA 17.7 violations 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. This patch changes the signature of __nvgpu_set_enabled to return void since the signature never implied it should return the final value of the flag. No code within NVGPU was using the return value anyway. JIRA NVGPU-677 Change-Id: Ib5d44d9a6a604a68c1f94b9475e9596eb14d1032 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/1810717 Reviewed-by: svc-misra-checker Reviewed-by: Scott Long GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/enabled.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/common/enabled.c') diff --git a/drivers/gpu/nvgpu/common/enabled.c b/drivers/gpu/nvgpu/common/enabled.c index 00df9e3b..eaebe48c 100644 --- a/drivers/gpu/nvgpu/common/enabled.c +++ b/drivers/gpu/nvgpu/common/enabled.c @@ -54,11 +54,11 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag) return test_bit(flag, g->enabled_flags); } -bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state) +void __nvgpu_set_enabled(struct gk20a *g, int flag, bool state) { if (state) { - return test_and_set_bit(flag, g->enabled_flags); + set_bit(flag, g->enabled_flags); } else { - return test_and_clear_bit(flag, g->enabled_flags); + clear_bit(flag, g->enabled_flags); } } -- cgit v1.2.2