From 3c3f80a687ae95c36341d9bf1753f63dfc4a06af Mon Sep 17 00:00:00 2001 From: smadhavan Date: Fri, 14 Sep 2018 11:58:41 +0530 Subject: gpu: nvgpu: MISRA Rule 21.2 header guard fixes MISRA rule 21.2 doesn't allow the use of macro names which start with an underscore. These leading underscores are to be removed from the macro names. This patch will fix such violations in nvgpu by renaming them to follow the convention,'NVGPU_PARENT-DIR_HEADER-NAME' when there is no keyword repetition between file name and directory or 'NVGPU_HEADER-NAME' when there is repetition. JIRA NVGPU-1028 Change-Id: I8a473c6c1a864f3893920d8e06e305095e523d2a Signed-off-by: smadhavan Reviewed-on: https://git-master.nvidia.com/r/1809082 Reviewed-by: svc-misra-checker Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Tested-by: Debarshi Dutta Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/volt/volt.h | 8 ++++---- drivers/gpu/nvgpu/volt/volt_dev.h | 7 +++---- drivers/gpu/nvgpu/volt/volt_pmu.h | 6 +++--- drivers/gpu/nvgpu/volt/volt_policy.h | 6 +++--- drivers/gpu/nvgpu/volt/volt_rail.h | 6 +++--- 5 files changed, 16 insertions(+), 17 deletions(-) (limited to 'drivers/gpu/nvgpu/volt') diff --git a/drivers/gpu/nvgpu/volt/volt.h b/drivers/gpu/nvgpu/volt/volt.h index 482172bf..8b4895f9 100644 --- a/drivers/gpu/nvgpu/volt/volt.h +++ b/drivers/gpu/nvgpu/volt/volt.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef _VOLT_H_ -#define _VOLT_H_ +#ifndef NVGPU_VOLT_H +#define NVGPU_VOLT_H #include "volt_rail.h" #include "volt_dev.h" @@ -36,4 +36,4 @@ struct obj_volt { struct voltage_policy_metadata volt_policy_metadata; }; -#endif /* DRIVERS_GPU_NVGPU_VOLT_VOLT_H_ */ +#endif /* NVGPU_VOLT_H */ diff --git a/drivers/gpu/nvgpu/volt/volt_dev.h b/drivers/gpu/nvgpu/volt/volt_dev.h index 98f3bce9..eb1868cb 100644 --- a/drivers/gpu/nvgpu/volt/volt_dev.h +++ b/drivers/gpu/nvgpu/volt/volt_dev.h @@ -20,9 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ - -#ifndef _VOLTDEV_H_ -#define _VOLTDEV_H_ +#ifndef NVGPU_VOLT_DEV_H +#define NVGPU_VOLT_DEV_H #include "boardobj/boardobj.h" #include "boardobj/boardobjgrp.h" @@ -75,4 +74,4 @@ struct voltage_device_pwm_entry { u32 volt_dev_sw_setup(struct gk20a *g); int volt_dev_pmu_setup(struct gk20a *g); -#endif /* _VOLTDEV_H_ */ +#endif /* NVGPU_VOLT_DEV_H */ diff --git a/drivers/gpu/nvgpu/volt/volt_pmu.h b/drivers/gpu/nvgpu/volt/volt_pmu.h index fbdf7c1e..c9fb8bfc 100644 --- a/drivers/gpu/nvgpu/volt/volt_pmu.h +++ b/drivers/gpu/nvgpu/volt/volt_pmu.h @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef _VOLT_PMU_H_ -#define _VOLT_PMU_H_ +#ifndef NVGPU_VOLT_PMU_H +#define NVGPU_VOLT_PMU_H u32 volt_pmu_send_load_cmd_to_pmu(struct gk20a *g); u32 volt_set_voltage(struct gk20a *g, u32 logic_voltage_uv, @@ -43,4 +43,4 @@ u32 nvgpu_volt_rail_get_voltage_gv10x(struct gk20a *g, u32 nvgpu_volt_send_load_cmd_to_pmu_gv10x(struct gk20a *g); -#endif +#endif /* NVGPU_VOLT_PMU_H */ diff --git a/drivers/gpu/nvgpu/volt/volt_policy.h b/drivers/gpu/nvgpu/volt/volt_policy.h index af13e02f..06f5aa3b 100644 --- a/drivers/gpu/nvgpu/volt/volt_policy.h +++ b/drivers/gpu/nvgpu/volt/volt_policy.h @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef _VOLT_POLICY_H_ -#define _VOLT_POLICY_H_ +#ifndef NVGPU_VOLT_POLICY_H +#define NVGPU_VOLT_POLICY_H #define VOLT_POLICY_INDEX_IS_VALID(pvolt, policy_idx) \ (boardobjgrp_idxisvalid( \ @@ -77,4 +77,4 @@ struct voltage_policy_single_rail_multi_step { int volt_policy_sw_setup(struct gk20a *g); int volt_policy_pmu_setup(struct gk20a *g); -#endif +#endif /* NVGPU_VOLT_POLICY_H */ diff --git a/drivers/gpu/nvgpu/volt/volt_rail.h b/drivers/gpu/nvgpu/volt/volt_rail.h index 6c667eed..522d635a 100644 --- a/drivers/gpu/nvgpu/volt/volt_rail.h +++ b/drivers/gpu/nvgpu/volt/volt_rail.h @@ -21,8 +21,8 @@ */ -#ifndef _VOLT_RAIL_H_ -#define _VOLT_RAIL_H_ +#ifndef NVGPU_VOLT_RAIL_H +#define NVGPU_VOLT_RAIL_H #include "boardobj/boardobj.h" #include "boardobj/boardobjgrp.h" @@ -87,4 +87,4 @@ u8 volt_rail_volt_domain_convert_to_idx(struct gk20a *g, u8 volt_domain); int volt_rail_sw_setup(struct gk20a *g); int volt_rail_pmu_setup(struct gk20a *g); -#endif +#endif /* NVGPU_VOLT_RAIL_H */ -- cgit v1.2.2