gpu: nvgpu: MISRA 21.2 fixes: __nvgpu_set_enabled()

Rename __nvgpu_set_enabled() to nvgpu_set_enabled(). The original
double underscore was present to indicate that this function is a
function with potentially unintended side effects (enabling a feature
has wide ranging impact).

To not lose this documentation a comment was added to convey that this
function must be used with care.

JIRA NVGPU-1029

Change-Id: I8bfc6fa4c17743f9f8056cb6a7a0f66229ca2583
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1989434
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2019-01-07 10:26:39 -08:00
committed by mobile promotions
parent 4ce9c114d5
commit 489236d181
39 changed files with 203 additions and 199 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -48,7 +48,7 @@ int nvgpu_get_nvhost_dev(struct gk20a *g)
} else {
if (nvgpu_has_syncpoints(g)) {
nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support");
__nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
}
return 0;
}
@@ -270,7 +270,7 @@ int nvgpu_nvhost_syncpt_init(struct gk20a *g)
err = nvgpu_get_nvhost_dev(g);
if (err) {
nvgpu_err(g, "host1x device not available");
__nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
return -ENOSYS;
}
@@ -280,7 +280,7 @@ int nvgpu_nvhost_syncpt_init(struct gk20a *g)
&g->syncpt_unit_size);
if (err) {
nvgpu_err(g, "Failed to get syncpt interface");
__nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
return -ENOSYS;
}