From 2e07e0633081a838f139fac0565366383f7302c4 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 2 Aug 2017 14:53:10 -0700 Subject: gpu: nvgpu: Remove unnecessary use of ACCESS_ONCE() ACCESS_ONCE() is used for making sure that in a given place of code access a variable exactly once. It prevents compiler rearranging the read from happening earlier. Remove its use from cases where rearranging of the read does not create problems. Change-Id: I340f375e8fecc31f3a3fab543256069cb4c682dc Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1531649 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/common/pmu/pmu_pg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/pmu') diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c index 3cdeedcc..ca74f243 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c @@ -206,7 +206,7 @@ int nvgpu_pmu_enable_elpg(struct gk20a *g) pg_engine_id++) { if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS && - ACCESS_ONCE(pmu->mscg_stat) == PMU_MSCG_DISABLED) + pmu->mscg_stat == PMU_MSCG_DISABLED) continue; if (BIT(pg_engine_id) & pg_engine_id_list) @@ -281,7 +281,7 @@ int nvgpu_pmu_disable_elpg(struct gk20a *g) pg_engine_id++) { if (pg_engine_id == PMU_PG_ELPG_ENGINE_ID_MS && - ACCESS_ONCE(pmu->mscg_stat) == PMU_MSCG_DISABLED) + pmu->mscg_stat == PMU_MSCG_DISABLED) continue; if (BIT(pg_engine_id) & pg_engine_id_list) { -- cgit v1.2.2