Skip to contentSkip to conversation

exynos: mmu: use CONFIG_IS_ENABLED

PATCH In review Minkyu Kang 3 participants 3 messages Nov 4, 2021 – Nov 9, 2021 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20211104071929epcas1p4ed9edd2f6714a14522b43132da8743dd@epcas1p4.samsung.com

#1 lore raw

PATCH 2/2 exynos: mmu: use CONFIG_IS_ENABLED

to fix following checkpatch warnings.
Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible

Cc Dzmitry Sankouski <[email protected]>
---
 arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-exynos/mmu-arm64.c +6 -5
index e3bd995..d2c550b 100644
@@ -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,
Signature · 4 lines
1.9.1
-- 
Thanks,
Minkyu Kang.
Reviewed-by on v1 2/2
#2 lore raw
Quoted 6 lines · Minkyu Kang

to fix following checkpatch warnings.
Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible

Cc Dzmitry Sankouski <[email protected]>

Best Regards,
Jaehoon Chung

Quoted 43 lines
---
 arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-exynos/mmu-arm64.c +6 -5
index e3bd995..d2c550b 100644
@@ -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,
#3 lore raw
In reply to Minkyu Kang

2021년 11월 4일 (목) 16:20, Minkyu Kang <[email protected]>님이 작성:

Quoted 56 lines

to fix following checkpatch warnings.
Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible

Cc Dzmitry Sankouski <[email protected]>
---
 arch/arm/mach-exynos/mmu-arm64.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-exynos/mmu-arm64.c +6 -6
index e3bd995..d2c550b 100644
@@ -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.

Quoted 1 line

applied to u-boot-samsung.

Thanks.

Signature · 1 line
Thanks. Minkyu Kang.