diff options
author | smadhavan <smadhavan@nvidia.com> | 2018-09-11 01:26:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-18 02:40:03 -0400 |
commit | de6b40b862d0a0c43d1b93d28c8a705040ebd4a3 (patch) | |
tree | 54bc8666488238a412608d865313cc07f9d06eeb /drivers/gpu/nvgpu | |
parent | 82c94e22916fb76fbb145e88079130ed4c6a6c32 (diff) |
nvgpu: ctrl: 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 ctrl 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: Ia7e5bf76dd2a8689e365bdeb27eac4b6e9ca4cfd
Signed-off-by: smadhavan <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1815657
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlboardobj.h | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlclk.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlclkavfs.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlperf.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlpmgr.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrltherm.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/ctrl/ctrlvolt.h | 6 |
7 files changed, 24 insertions, 25 deletions
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlboardobj.h b/drivers/gpu/nvgpu/ctrl/ctrlboardobj.h index 5941e2e6..9e4402a5 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlboardobj.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlboardobj.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -20,8 +20,8 @@ | |||
20 | * DEALINGS IN THE SOFTWARE. | 20 | * DEALINGS IN THE SOFTWARE. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifndef _ctrlboardobj_h_ | 23 | #ifndef NVGPU_CTRLBOARDOBJ_H |
24 | #define _ctrlboardobj_h_ | 24 | #define NVGPU_CTRLBOARDOBJ_H |
25 | 25 | ||
26 | struct ctrl_boardobj { | 26 | struct ctrl_boardobj { |
27 | u8 type; | 27 | u8 type; |
@@ -86,5 +86,4 @@ struct ctrl_boardobjgrp { | |||
86 | u32 obj_mask; | 86 | u32 obj_mask; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #endif | 89 | #endif /* NVGPU_CTRLBOARDOBJ_H */ |
90 | |||
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlclk.h b/drivers/gpu/nvgpu/ctrl/ctrlclk.h index 09a7e1ce..fbd56770 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlclk.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlclk.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef _ctrlclk_h_ | 24 | #ifndef NVGPU_CTRLCLK_H |
25 | #define _ctrlclk_h_ | 25 | #define NVGPU_CTRLCLK_H |
26 | 26 | ||
27 | #include "ctrlboardobj.h" | 27 | #include "ctrlboardobj.h" |
28 | #include "ctrlclkavfs.h" | 28 | #include "ctrlclkavfs.h" |
@@ -209,4 +209,4 @@ struct ctrl_clk_clk_domain_list { | |||
209 | #define CTRL_CLK_VF_PAIR_VOLTAGE_UV_SET(pvfpair, _voltageuv) \ | 209 | #define CTRL_CLK_VF_PAIR_VOLTAGE_UV_SET(pvfpair, _voltageuv) \ |
210 | (((pvfpair)->voltage_uv) = (_voltageuv)) | 210 | (((pvfpair)->voltage_uv) = (_voltageuv)) |
211 | 211 | ||
212 | #endif | 212 | #endif /* NVGPU_CTRLCLK_H */ |
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlclkavfs.h b/drivers/gpu/nvgpu/ctrl/ctrlclkavfs.h index 5b757cbf..b01e4ffa 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlclkavfs.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlclkavfs.h | |||
@@ -20,8 +20,8 @@ | |||
20 | * DEALINGS IN THE SOFTWARE. | 20 | * DEALINGS IN THE SOFTWARE. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifndef _ctrlclkavfs_h_ | 23 | #ifndef NVGPU_CTRLCLKAVFS_H |
24 | #define _ctrlclkavfs_h_ | 24 | #define NVGPU_CTRLCLKAVFS_H |
25 | 25 | ||
26 | #include "ctrlboardobj.h" | 26 | #include "ctrlboardobj.h" |
27 | /*! | 27 | /*! |
@@ -107,4 +107,4 @@ | |||
107 | #define CTRL_CLK_FLL_LUT_VSELECT_LOGIC (0x00000000) | 107 | #define CTRL_CLK_FLL_LUT_VSELECT_LOGIC (0x00000000) |
108 | #define CTRL_CLK_FLL_LUT_VSELECT_MIN (0x00000001) | 108 | #define CTRL_CLK_FLL_LUT_VSELECT_MIN (0x00000001) |
109 | #define CTRL_CLK_FLL_LUT_VSELECT_SRAM (0x00000002) | 109 | #define CTRL_CLK_FLL_LUT_VSELECT_SRAM (0x00000002) |
110 | #endif | 110 | #endif /* NVGPU_CTRLCLKAVFS_H */ |
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlperf.h b/drivers/gpu/nvgpu/ctrl/ctrlperf.h index 477b33d8..2928cad1 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlperf.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlperf.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef _ctrlperf_h_ | 24 | #ifndef NVGPU_CTRLPERF_H |
25 | #define _ctrlperf_h_ | 25 | #define NVGPU_CTRLPERF_H |
26 | 26 | ||
27 | struct ctrl_perf_volt_rail_list_item { | 27 | struct ctrl_perf_volt_rail_list_item { |
28 | u8 volt_domain; | 28 | u8 volt_domain; |
@@ -100,4 +100,4 @@ struct ctrl_perf_vfe_var_single_sensed_fuse_ver_vfield_info { | |||
100 | bool b_use_default_on_ver_check_fail; | 100 | bool b_use_default_on_ver_check_fail; |
101 | u8 v_field_id_ver; | 101 | u8 v_field_id_ver; |
102 | }; | 102 | }; |
103 | #endif | 103 | #endif /* NVGPU_CTRLPERF_H */ |
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlpmgr.h b/drivers/gpu/nvgpu/ctrl/ctrlpmgr.h index 75085fc3..165bbd5d 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlpmgr.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlpmgr.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Control pmgr state infrastructure | 2 | * Control pmgr state infrastructure |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef _ctrlpmgr_h_ | 24 | #ifndef NVGPU_CTRLPMGR_H |
25 | #define _ctrlpmgr_h_ | 25 | #define NVGPU_CTRLPMGR_H |
26 | 26 | ||
27 | #include "ctrlboardobj.h" | 27 | #include "ctrlboardobj.h" |
28 | 28 | ||
@@ -95,4 +95,4 @@ struct ctrl_pmgr_pwr_policy_limit_arbitration { | |||
95 | inputs[CTRL_PMGR_PWR_POLICY_MAX_LIMIT_INPUTS]; | 95 | inputs[CTRL_PMGR_PWR_POLICY_MAX_LIMIT_INPUTS]; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | #endif | 98 | #endif /* NVGPU_CTRLPMGR_H */ |
diff --git a/drivers/gpu/nvgpu/ctrl/ctrltherm.h b/drivers/gpu/nvgpu/ctrl/ctrltherm.h index 4491d364..27af7b04 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrltherm.h +++ b/drivers/gpu/nvgpu/ctrl/ctrltherm.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Control thermal infrastructure | 2 | * Control thermal infrastructure |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef _ctrltherm_h_ | 24 | #ifndef NVGPU_CTRLTHERM_H |
25 | #define _ctrltherm_h_ | 25 | #define NVGPU_CTRLTHERM_H |
26 | 26 | ||
27 | #include "ctrlboardobj.h" | 27 | #include "ctrlboardobj.h" |
28 | 28 | ||
@@ -30,4 +30,4 @@ | |||
30 | 30 | ||
31 | #define CTRL_THERMAL_THERM_CHANNEL_CLASS_DEVICE 0x01 | 31 | #define CTRL_THERMAL_THERM_CHANNEL_CLASS_DEVICE 0x01 |
32 | 32 | ||
33 | #endif | 33 | #endif /* NVGPU_CTRLTHERM_H */ |
diff --git a/drivers/gpu/nvgpu/ctrl/ctrlvolt.h b/drivers/gpu/nvgpu/ctrl/ctrlvolt.h index dcb8c8ea..ea06dbc4 100644 --- a/drivers/gpu/nvgpu/ctrl/ctrlvolt.h +++ b/drivers/gpu/nvgpu/ctrl/ctrlvolt.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | #ifndef _ctrlvolt_h_ | 24 | #ifndef NVGPU_CTRLVOLT_H |
25 | #define _ctrlvolt_h_ | 25 | #define NVGPU_CTRLVOLT_H |
26 | 26 | ||
27 | #define CTRL_VOLT_VOLT_RAIL_MAX_RAILS \ | 27 | #define CTRL_VOLT_VOLT_RAIL_MAX_RAILS \ |
28 | CTRL_BOARDOBJGRP_E32_MAX_OBJECTS | 28 | CTRL_BOARDOBJGRP_E32_MAX_OBJECTS |
@@ -140,4 +140,4 @@ struct ctrl_volt_volt_rail_list_v1 { | |||
140 | rails[CTRL_VOLT_VOLT_RAIL_MAX_RAILS]; | 140 | rails[CTRL_VOLT_VOLT_RAIL_MAX_RAILS]; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | #endif | 143 | #endif /* NVGPU_CTRLVOLT_H */ |