diff mbox series

[2/2] exynos: mmu: use CONFIG_IS_ENABLED

Message ID cd343d40-2b97-cc14-924f-b6a39c2c9d22@samsung.com
State Accepted
Commit a80f582688fb3c961f521a978d428092f5bab483
Delegated to: Minkyu Kang
Headers show
Series [1/2] exynos78x0: pinctrl: set const to structs | expand

Commit Message

Minkyu Kang Nov. 4, 2021, 7:13 a.m. UTC
to fix following checkpatch warnings.
Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where
possible

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Dzmitry Sankouski <dsankouski@gmail.com>
---
 arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Jaehoon Chung Nov. 9, 2021, 5:10 a.m. UTC | #1
On 11/4/21 4:13 PM, Minkyu Kang wrote:
> to fix following checkpatch warnings.
> Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where
> possible
> 
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Dzmitry Sankouski <dsankouski@gmail.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
>  arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c
> index e3bd995..d2c550b 100644
> --- a/arch/arm/mach-exynos/mmu-arm64.c
> +++ b/arch/arm/mach-exynos/mmu-arm64.c
> @@ -7,7 +7,8 @@
>  #include <common.h>
>  #include <asm/armv8/mmu.h>
>  
> -#ifdef CONFIG_EXYNOS7420
> +#if CONFIG_IS_ENABLED(EXYNOS7420)
> +
>  static struct mm_region exynos7420_mem_map[] = {
>  	{
>  		.virt	= 0x10000000UL,
> @@ -28,9 +29,9 @@ static struct mm_region exynos7420_mem_map[] = {
>  };
>  
>  struct mm_region *mem_map = exynos7420_mem_map;
> -#endif
>  
> -#ifdef CONFIG_EXYNOS7870
> +#elif CONFIG_IS_ENABLED(EXYNOS7870)
> +
>  static struct mm_region exynos7870_mem_map[] = {
>  	{
>  		.virt	= 0x10000000UL,
> @@ -61,9 +62,9 @@ static struct mm_region exynos7870_mem_map[] = {
>  };
>  
>  struct mm_region *mem_map = exynos7870_mem_map;
> -#endif
>  
> -#ifdef CONFIG_EXYNOS7880
> +#elif CONFIG_IS_ENABLED(EXYNOS7880)
> +
>  static struct mm_region exynos7880_mem_map[] = {
>  	{
>  		.virt	= 0x10000000UL,
>
Minkyu Kang Nov. 9, 2021, 9:51 a.m. UTC | #2
2021년 11월 4일 (목) 16:20, Minkyu Kang <mk7.kang@samsung.com>님이 작성:

> to fix following checkpatch warnings.
> Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where
> possible
>
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mmu-arm64.c
> b/arch/arm/mach-exynos/mmu-arm64.c
> index e3bd995..d2c550b 100644
> --- a/arch/arm/mach-exynos/mmu-arm64.c
> +++ b/arch/arm/mach-exynos/mmu-arm64.c
> @@ -7,7 +7,8 @@
>  #include <common.h>
>  #include <asm/armv8/mmu.h>
>
> -#ifdef CONFIG_EXYNOS7420
> +#if CONFIG_IS_ENABLED(EXYNOS7420)
> +
>  static struct mm_region exynos7420_mem_map[] = {
>         {
>                 .virt   = 0x10000000UL,
> @@ -28,9 +29,9 @@ static struct mm_region exynos7420_mem_map[] = {
>  };
>
>  struct mm_region *mem_map = exynos7420_mem_map;
> -#endif
>
> -#ifdef CONFIG_EXYNOS7870
> +#elif CONFIG_IS_ENABLED(EXYNOS7870)
> +
>  static struct mm_region exynos7870_mem_map[] = {
>         {
>                 .virt   = 0x10000000UL,
> @@ -61,9 +62,9 @@ static struct mm_region exynos7870_mem_map[] = {
>  };
>
>  struct mm_region *mem_map = exynos7870_mem_map;
> -#endif
>
> -#ifdef CONFIG_EXYNOS7880
> +#elif CONFIG_IS_ENABLED(EXYNOS7880)
> +
>  static struct mm_region exynos7880_mem_map[] = {
>         {
>                 .virt   = 0x10000000UL,
> --
> 1.9.1
> --
> Thanks,
> Minkyu Kang.


> applied to u-boot-samsung.

Thanks.
diff mbox series

Patch

diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c
index e3bd995..d2c550b 100644
--- a/arch/arm/mach-exynos/mmu-arm64.c
+++ b/arch/arm/mach-exynos/mmu-arm64.c
@@ -7,7 +7,8 @@ 
 #include <common.h>
 #include <asm/armv8/mmu.h>
 
-#ifdef CONFIG_EXYNOS7420
+#if CONFIG_IS_ENABLED(EXYNOS7420)
+
 static struct mm_region exynos7420_mem_map[] = {
 	{
 		.virt	= 0x10000000UL,
@@ -28,9 +29,9 @@  static struct mm_region exynos7420_mem_map[] = {
 };
 
 struct mm_region *mem_map = exynos7420_mem_map;
-#endif
 
-#ifdef CONFIG_EXYNOS7870
+#elif CONFIG_IS_ENABLED(EXYNOS7870)
+
 static struct mm_region exynos7870_mem_map[] = {
 	{
 		.virt	= 0x10000000UL,
@@ -61,9 +62,9 @@  static struct mm_region exynos7870_mem_map[] = {
 };
 
 struct mm_region *mem_map = exynos7870_mem_map;
-#endif
 
-#ifdef CONFIG_EXYNOS7880
+#elif CONFIG_IS_ENABLED(EXYNOS7880)
+
 static struct mm_region exynos7880_mem_map[] = {
 	{
 		.virt	= 0x10000000UL,