summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorNicolas Benech <nbenech@nvidia.com>2018-08-31 11:46:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-04 19:17:07 -0400
commit010cd8510b41ed154720e0c440e1ccdb6d86e239 (patch)
tree9d712789bc899faa7ed26b7b3a64feaefeff0225 /drivers/gpu/nvgpu/include
parent9e4bbd2c9b4d5d9712921a7db058061e4f8cd389 (diff)
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 <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1810717 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Scott Long <scottl@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/enabled.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
index a0b738e0..54c4d61c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
@@ -192,10 +192,9 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag);
192 * @flag - Which flag to modify. 192 * @flag - Which flag to modify.
193 * @state - The state to set the flag to. 193 * @state - The state to set the flag to.
194 * 194 *
195 * Set the state of the passed @flag to @state. This will return the previous 195 * Set the state of the passed @flag to @state.
196 * state of the passed @flag.
197 */ 196 */
198bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state); 197void __nvgpu_set_enabled(struct gk20a *g, int flag, bool state);
199 198
200int nvgpu_init_enabled_flags(struct gk20a *g); 199int nvgpu_init_enabled_flags(struct gk20a *g);
201void nvgpu_free_enabled_flags(struct gk20a *g); 200void nvgpu_free_enabled_flags(struct gk20a *g);