From 212e8ee5d0297b18c9cf7f3942984fd02123bf82 Mon Sep 17 00:00:00 2001 From: smadhavan Date: Mon, 10 Sep 2018 16:16:15 +0530 Subject: nvgpu: acr: 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 acr 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: Iff731ad531a6131afb3c93e27c07f377bbae047b Signed-off-by: smadhavan Reviewed-on: https://git-master.nvidia.com/r/1817940 Reviewed-by: svc-misra-checker Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h | 10 +++++----- drivers/gpu/nvgpu/include/nvgpu/acr/acr_lsfm.h | 8 ++++---- drivers/gpu/nvgpu/include/nvgpu/acr/acr_objflcn.h | 10 +++++----- drivers/gpu/nvgpu/include/nvgpu/acr/acr_objlsfm.h | 8 ++++---- drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h | 7 ++++--- 5 files changed, 22 insertions(+), 21 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h index 52dc3f24..ad697b2b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_flcnbl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-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"), @@ -19,12 +19,12 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef __ACR_FLCNBL_H__ -#define __ACR_FLCNBL_H__ +#ifndef NVGPU_ACR_FLCNBL_H +#define NVGPU_ACR_FLCNBL_H #include -#ifndef __NVGPU_ACR_H__ +#ifndef NVGPU_ACR_H #warning "acr_flcnbl.h not included from nvgpu_acr.h!" \ "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces" #endif @@ -141,4 +141,4 @@ union flcn_bl_generic_desc_v1 { struct loader_config_v1 loader_cfg_v1; }; -#endif /* __ACR_FLCNBL_H__ */ +#endif /* NVGPU_ACR_FLCNBL_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_lsfm.h b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_lsfm.h index f9d9e2a8..ed585527 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_lsfm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_lsfm.h @@ -19,10 +19,10 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef __ACR_LSFM_H__ -#define __ACR_LSFM_H__ +#ifndef NVGPU_ACR_LSFM_H +#define NVGPU_ACR_LSFM_H -#ifndef __NVGPU_ACR_H__ +#ifndef NVGPU_ACR_H #warning "acr_lsfm.h not included from nvgpu_acr.h!" \ "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces" #endif @@ -325,4 +325,4 @@ struct flcn_acr_desc_v1 { }; -#endif /* __ACR_LSFM_H__ */ +#endif /* NVGPU_ACR_LSFM_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objflcn.h b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objflcn.h index 951eb3c6..57b43c8a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objflcn.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objflcn.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-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"), @@ -19,10 +19,10 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef __ACR_OBJFLCN_H__ -#define __ACR_OBJFLCN_H__ +#ifndef NVGPU_ACR_OBJFLCN_H +#define NVGPU_ACR_OBJFLCN_H -#ifndef __NVGPU_ACR_H__ +#ifndef NVGPU_ACR_H #warning "acr_objflcn.h not included from nvgpu_acr.h!" \ "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces" #endif @@ -88,4 +88,4 @@ struct flcn_ucode_img_v1 { #define FLCN_NL_UCODE_HDR_OS_OVL_SIZE_IND(N) \ (FLCN_NL_UCODE_HDR_APP_DATA_END_IND(N) + 2) -#endif /* __ACR_OBJFLCN_H__ */ +#endif /* NVGPU_ACR_OBJFLCN_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objlsfm.h b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objlsfm.h index 96fb9f19..e3769bb7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objlsfm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/acr_objlsfm.h @@ -19,10 +19,10 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef __ACR_OBJLSFM_H__ -#define __ACR_OBJLSFM_H__ +#ifndef NVGPU_ACR_OBJLSFM_H +#define NVGPU_ACR_OBJLSFM_H -#ifndef __NVGPU_ACR_H__ +#ifndef NVGPU_ACR_H #warning "acr_objlsfm.h not included from nvgpu_acr.h!" \ "Include nvgpu_acr.h instead of acr_xxx.h to get access to ACR interfaces" #endif @@ -94,4 +94,4 @@ struct ls_flcn_mgr_v1 { }; -#endif /* __ACR_OBJLSFM_H__ */ +#endif /* NVGPU_ACR_OBJLSFM_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h index ba658c95..7a0143e7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef __NVGPU_ACR_H__ -#define __NVGPU_ACR_H__ +#ifndef NVGPU_ACR_H +#define NVGPU_ACR_H #include @@ -184,4 +184,5 @@ struct nvgpu_acr { void (*remove_support)(struct nvgpu_acr *acr); }; -#endif /*__NVGPU_ACR_H__*/ +#endif /* NVGPU_ACR_H */ + -- cgit v1.2.2