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/therm/thrm.h | 8 ++++---- drivers/gpu/nvgpu/therm/thrmchannel.h | 6 +++--- drivers/gpu/nvgpu/therm/thrmdev.h | 6 +++--- drivers/gpu/nvgpu/therm/thrmpmu.h | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/gpu/nvgpu/therm') diff --git a/drivers/gpu/nvgpu/therm/thrm.h b/drivers/gpu/nvgpu/therm/thrm.h index 5b5a5a57..d9d73b7f 100644 --- a/drivers/gpu/nvgpu/therm/thrm.h +++ b/drivers/gpu/nvgpu/therm/thrm.h @@ -1,7 +1,7 @@ /* * general thermal table structures & definitions * - * 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"), @@ -21,8 +21,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef _THRM_H_ -#define _THRM_H_ +#ifndef NVGPU_THERM_THRM_H +#define NVGPU_THERM_THRM_H #include "thrmdev.h" #include "thrmchannel.h" @@ -35,4 +35,4 @@ struct therm_pmupstate { u32 therm_domain_sw_setup(struct gk20a *g); u32 therm_domain_pmu_setup(struct gk20a *g); -#endif +#endif /* NVGPU_THERM_THRM_H */ diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.h b/drivers/gpu/nvgpu/therm/thrmchannel.h index a2045c26..89be673f 100644 --- a/drivers/gpu/nvgpu/therm/thrmchannel.h +++ b/drivers/gpu/nvgpu/therm/thrmchannel.h @@ -21,8 +21,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef _THRMCHANNEL_H_ -#define _THRMCHANNEL_H_ +#ifndef NVGPU_THERM_THRMCHANNEL_H +#define NVGPU_THERM_THRMCHANNEL_H #include "boardobj/boardobj.h" #include "boardobj/boardobjgrp.h" @@ -48,4 +48,4 @@ struct therm_channel_device { int therm_channel_sw_setup(struct gk20a *g); -#endif +#endif /* NVGPU_THERM_THRMCHANNEL_H */ diff --git a/drivers/gpu/nvgpu/therm/thrmdev.h b/drivers/gpu/nvgpu/therm/thrmdev.h index df4c199a..151e96fb 100644 --- a/drivers/gpu/nvgpu/therm/thrmdev.h +++ b/drivers/gpu/nvgpu/therm/thrmdev.h @@ -21,8 +21,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef _THRMDEV_H_ -#define _THRMDEV_H_ +#ifndef NVGPU_THERM_THRMDEV_H +#define NVGPU_THERM_THRMDEV_H #include "boardobj/boardobj.h" #include "boardobj/boardobjgrp.h" @@ -55,4 +55,4 @@ struct therm_device_hbm2_combined { int therm_device_sw_setup(struct gk20a *g); -#endif +#endif /* NVGPU_THERM_THRMDEV_H */ diff --git a/drivers/gpu/nvgpu/therm/thrmpmu.h b/drivers/gpu/nvgpu/therm/thrmpmu.h index 1341a055..42d5caae 100644 --- a/drivers/gpu/nvgpu/therm/thrmpmu.h +++ b/drivers/gpu/nvgpu/therm/thrmpmu.h @@ -21,11 +21,11 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef _THRMPMU_H_ -#define _THRMPMU_H_ +#ifndef NVGPU_THERM_THRMPMU_H +#define NVGPU_THERM_THRMPMU_H int therm_send_pmgr_tables_to_pmu(struct gk20a *g); u32 therm_configure_therm_alert(struct gk20a *g); -#endif +#endif /* NVGPU_THERM_THRMPMU_H */ -- cgit v1.2.2