Skip to contentSkip to conversation

ARM: EXYNOS: Trivial cleanup in mach-exynos

PATCH Superseded Pankaj Dubey 2 participants 14 messages Feb 22, 2016 – Feb 24, 2016

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: EXYNOS: Trivial cleanup in mach-exynos

This patch series cleans up mach-exynos files with resepct to unused header file inclusion, leftover redundant register offset definition. Also corrects comment section at few places.

Pankaj Dubey (3):
ARM: EXYNOS: correct header comment in Kconfig file
ARM: EXYNOS: remove unused register offset definition
ARM: EXYNOS: cleanup header files inclusion

 arch/arm/mach-exynos/Kconfig            | 2 +-
 arch/arm/mach-exynos/common.h           | 1 -
 arch/arm/mach-exynos/exynos.c           | 5 -----
 arch/arm/mach-exynos/firmware.c         | 2 --
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 arch/arm/mach-exynos/platsmp.c          | 1 -
 arch/arm/mach-exynos/pm.c               | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c      | 1 -
 8 files changed, 3 insertions(+), 22 deletions(-)
Signature · 1 line
2.4.5
#1 lore raw

PATCH 1/3 ARM: EXYNOS: correct header comment in Kconfig file

This patch corrects header comment of Kconfig file by changing EXYNOS4 to EXYNOS.

---
 arch/arm/mach-exynos/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-exynos/Kconfig +1 -1
index eb26986..71ef48f 100644
@@ -5,7 +5,7 @@
 #
 # Licensed under GPLv2
 
-# Configuration options for the EXYNOS4
+# Configuration options for the EXYNOS
 
 menuconfig ARCH_EXYNOS
 	bool "Samsung EXYNOS"
Signature · 1 line
2.4.5
#2 lore raw

PATCH 1/3 ARM: EXYNOS: correct header comment in Kconfig file

Quoted 7 lines · Pankaj Dubey

This patch corrects header comment of Kconfig file by changing EXYNOS4 to EXYNOS.

---
 arch/arm/mach-exynos/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied.

Krzysztof

#3 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

In reply to Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -8
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>
 
 #define EXYNOS_PA_CHIPID		0x10000000
@@ -30,6 +24,5 @@
 #define EXYNOS4_PA_DMC1			0x10410000
 
 #define EXYNOS4_PA_COREPERI		0x10500000
-#define EXYNOS4_PA_L2CC			0x10502000
 
 #endif /* __ASM_ARCH_MAP_H */
Signature · 1 line
2.4.5
#4 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

Quoted 22 lines · Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -1
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

arch/arm/mach-exynos/include/mach/map.h line 17

Quoted 10 lines
arch/arm/mach-exynos/include/mach/map.h +0 -6
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>

This does not look good. The S3C_UART_OFFSET is used in plat/map-s5p.h.

Best regards,
Krzysztof

#5 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -1
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
Quoted 10 lines

arch/arm/mach-exynos/include/mach/map.h line 17

Quoted 7 lines
arch/arm/mach-exynos/include/mach/map.h +0 -6
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>

This does not look good. The S3C_UART_OFFSET is used in plat/map-s5p.h.

Actually it's just defined there but not getting used anywhere. In fact we can remove it from there also. So I submitted another patch to cleanup such redundant register definitions from plat/map-s5p.h. Only platform using S3C_UART_OFFSET is s3c64xx and its using definition from map-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal of S3C_UART_OFFSET from map-s5p.c and map.h.

Thanks,
Pankaj Dubey

Quoted 3 lines

Best regards,
Krzysztof

#6 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

Quoted 40 lines · pankaj.dubey

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -1
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
Quoted 10 lines

arch/arm/mach-exynos/include/mach/map.h line 17

Quoted 7 lines
arch/arm/mach-exynos/include/mach/map.h +0 -6
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>

This does not look good. The S3C_UART_OFFSET is used in plat/map-s5p.h.

Quoted 2 lines

Actually it's just defined there but not getting used anywhere. In fact we can remove it from there also.

The point is that your patch introduce changes. Before S3C_UART_OFFSET was defined to 0x10000, after (because of #ifndef) it will be 0x400. Description of "unused" is not accurate. Unused stuff does not impact anything.

Quoted 2 lines

So I submitted another patch to
cleanup such redundant register definitions from plat/map-s5p.h.

That would be good.

Quoted 4 lines

Only platform using S3C_UART_OFFSET is s3c64xx and its using definition from map-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal of S3C_UART_OFFSET from map-s5p.c and map.h.

The compilation is not a test. You compiled something like this:
-#define S3C_UART_OFFSET (0x10000)
#ifndef S3C_UART_OFFSET
#define S3C_UART_OFFSET (0x400)
#endif

... and found no errors. Of course there are no compilation errors! But the value has changed!

Best regards,
Krzysztof

#7 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

Quoted 59 lines · Krzysztof Kozlowski
Quoted 40 lines · pankaj.dubey

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -1
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
Quoted 10 lines

arch/arm/mach-exynos/include/mach/map.h line 17

Quoted 7 lines
arch/arm/mach-exynos/include/mach/map.h +0 -6
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>

This does not look good. The S3C_UART_OFFSET is used in plat/map-s5p.h.

Quoted 2 lines

Actually it's just defined there but not getting used anywhere. In fact we can remove it from there also.

The point is that your patch introduce changes. Before S3C_UART_OFFSET was defined to 0x10000, after (because of #ifndef) it will be 0x400. Description of "unused" is not accurate. Unused stuff does not impact anything.

Quoted 2 lines

So I submitted another patch to
cleanup such redundant register definitions from plat/map-s5p.h.

That would be good.

Quoted 4 lines

Only platform using S3C_UART_OFFSET is s3c64xx and its using definition from map-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal of S3C_UART_OFFSET from map-s5p.c and map.h.

Quoted 9 lines

The compilation is not a test. You compiled something like this:
-#define S3C_UART_OFFSET (0x10000)
#ifndef S3C_UART_OFFSET
#define S3C_UART_OFFSET (0x400)
#endif

... and found no errors. Of course there are no compilation errors! But the value has changed!

OK. I see, there are quite a few places these definitions are scattered even though not used (not used in the sense what ever values these macros are taking in code it's not used). Such as mach-exynos/include/map.h, plat-samsung/include/plat/{map-s3c.h, map-s5p.h} and mach-s3c24xx/include/mach/map.h. So I will remove all these in one go.
Is this fine?
Also I have one doubt in case I am touching files across various mach files and preparing a single patch what should be commit message heading? Is commit starting with "ARM: samsung" fine? or anything more appropriate you would suggest.

Thanks,
Pankaj Dubey

Quoted 5 lines

Best regards,
Krzysztof

#8 lore raw

PATCH 2/3 ARM: EXYNOS: remove unused register offset definition

Quoted 72 lines · pankaj.dubey
Quoted 59 lines · Krzysztof Kozlowski
Quoted 40 lines · pankaj.dubey

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Pankaj Dubey

This patch cleans up map.h by removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.

---
 arch/arm/mach-exynos/include/mach/map.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +1 -1
index 351e839..c48ba4f 100644
@@ -2,7 +2,7 @@
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
  *
- * EXYNOS4 - Memory map definitions
+ * EXYNOS - Memory map definitions
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,12 +14,6 @@
 
 #include <plat/map-base.h>
 
Quoted 10 lines

arch/arm/mach-exynos/include/mach/map.h line 17

Quoted 7 lines
arch/arm/mach-exynos/include/mach/map.h +0 -6
-/*
- * EXYNOS4 UART offset is 0x10000 but the older S5P SoCs are 0x400.
- * So need to define it, and here is to avoid redefinition warning.
- */
-#define S3C_UART_OFFSET			(0x10000)
-
 #include <plat/map-s5p.h>

This does not look good. The S3C_UART_OFFSET is used in plat/map-s5p.h.

Quoted 2 lines

Actually it's just defined there but not getting used anywhere. In fact we can remove it from there also.

The point is that your patch introduce changes. Before S3C_UART_OFFSET was defined to 0x10000, after (because of #ifndef) it will be 0x400. Description of "unused" is not accurate. Unused stuff does not impact anything.

Quoted 2 lines

So I submitted another patch to
cleanup such redundant register definitions from plat/map-s5p.h.

That would be good.

Quoted 4 lines

Only platform using S3C_UART_OFFSET is s3c64xx and its using definition from map-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal of S3C_UART_OFFSET from map-s5p.c and map.h.

Quoted 9 lines

The compilation is not a test. You compiled something like this:
-#define S3C_UART_OFFSET (0x10000)
#ifndef S3C_UART_OFFSET
#define S3C_UART_OFFSET (0x400)
#endif

... and found no errors. Of course there are no compilation errors! But the value has changed!

Quoted 7 lines

OK. I see, there are quite a few places these definitions are scattered even though not used (not used in the sense what ever values these macros are taking in code it's not used). Such as mach-exynos/include/map.h, plat-samsung/include/plat/{map-s3c.h, map-s5p.h} and mach-s3c24xx/include/mach/map.h. So I will remove all these in one go.
Is this fine?

Except the used ones (s3c64xx) - yes, all at once. Some of them depend on previous ones (ifndef) so "unused" when patching this one-by-one is not accurate.

Quoted 4 lines

Also I have one doubt in case I am touching files across various mach files and preparing a single patch what should be commit message heading? Is commit starting with "ARM: samsung" fine? or anything more appropriate you would suggest.

It is still the same Samsung tree and either way it would end in the same branch. ARM: SAMSUNG: is fine (I saw it in the log).

Best regards,
Krzysztof

#9 lore raw

PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion

In reply to Pankaj Dubey

This includes trivial cleanup in exynos files such as
- remove unused header files inclusion from exynos.c, s5p-dev-mfc.c, firmware.c, pm.c.
- move inclusion of of.h from common.h to pm.c where it is really required

---
 arch/arm/mach-exynos/common.h      | 1 -
 arch/arm/mach-exynos/exynos.c      | 5 -----
 arch/arm/mach-exynos/firmware.c    | 2 --
 arch/arm/mach-exynos/platsmp.c     | 1 -
 arch/arm/mach-exynos/pm.c          | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c | 1 -
 6 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/mach-exynos/common.h +0 -1
index e349a03..5365bf1 100644
@@ -12,7 +12,6 @@
 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
-#include <linux/of.h>
 #include <linux/platform_data/cpuidle-exynos.h>
 
 #define EXYNOS3250_SOC_ID	0xE3472000
arch/arm/mach-exynos/exynos.c +0 -5
index 99947ad..54262a1 100644
@@ -11,14 +11,10 @@
 
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>
-#include <linux/pm_domain.h>
 #include <linux/irqchip.h>
 #include <linux/soc/samsung/exynos-regs-pmu.h>
 
@@ -26,7 +22,6 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <asm/memory.h>
 
 #include <mach/map.h>
 
arch/arm/mach-exynos/firmware.c +0 -2
index 111cfbf..1bfd1b0 100644
@@ -20,8 +20,6 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/suspend.h>
 
-#include <mach/map.h>
-
 #include "common.h"
 #include "smc.h"
 
arch/arm/mach-exynos/platsmp.c +0 -1
index da46c63..85c3be6 100644
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
-#include <linux/device.h>
 #include <linux/jiffies.h>
 #include <linux/smp.h>
 #include <linux/io.h>
arch/arm/mach-exynos/pm.c +1 -3
index b9b9186..c43b776 100644
@@ -17,7 +17,7 @@
 #include <linux/suspend.h>
 #include <linux/cpu_pm.h>
 #include <linux/io.h>
-#include <linux/err.h>
+#include <linux/of.h>
 #include <linux/soc/samsung/exynos-regs-pmu.h>
 #include <linux/soc/samsung/exynos-pmu.h>
 
@@ -28,8 +28,6 @@
 
 #include <mach/map.h>
 
-#include <plat/pm-common.h>
-
 #include "common.h"
 
 static inline void __iomem *exynos_boot_vector_addr(void)
arch/arm/mach-exynos/s5p-dev-mfc.c +0 -1
index 0b04b6b..8ef1f3e 100644
@@ -9,7 +9,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/memblock.h>
Signature · 1 line
2.4.5
#10 lore raw

PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion

Quoted 33 lines · Pankaj Dubey

This includes trivial cleanup in exynos files such as
- remove unused header files inclusion from exynos.c, s5p-dev-mfc.c, firmware.c, pm.c.
- move inclusion of of.h from common.h to pm.c where it is really required

---
 arch/arm/mach-exynos/common.h      | 1 -
 arch/arm/mach-exynos/exynos.c      | 5 -----
 arch/arm/mach-exynos/firmware.c    | 2 --
 arch/arm/mach-exynos/platsmp.c     | 1 -
 arch/arm/mach-exynos/pm.c          | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c | 1 -
 6 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/mach-exynos/common.h +0 -1
index e349a03..5365bf1 100644
@@ -12,7 +12,6 @@
 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
-#include <linux/of.h>
 #include <linux/platform_data/cpuidle-exynos.h>
 
 #define EXYNOS3250_SOC_ID	0xE3472000
arch/arm/mach-exynos/exynos.c +0 -0
index 99947ad..54262a1 100644

arch/arm/mach-exynos/exynos.c line 20

Quoted 10 lines
arch/arm/mach-exynos/exynos.c +0 -3
@@ -11,14 +11,10 @@
 
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>

platform_device is actually used in that file. It looks unused because it is pulled by of_platform, but it makes sense to include it here.

Rest looks good.

BR,
Krzysztof

#11 lore raw

PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion

Hi Krzysztof,

Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · Pankaj Dubey

This includes trivial cleanup in exynos files such as
- remove unused header files inclusion from exynos.c, s5p-dev-mfc.c, firmware.c, pm.c.
- move inclusion of of.h from common.h to pm.c where it is really required

---
 arch/arm/mach-exynos/common.h      | 1 -
 arch/arm/mach-exynos/exynos.c      | 5 -----
 arch/arm/mach-exynos/firmware.c    | 2 --
 arch/arm/mach-exynos/platsmp.c     | 1 -
 arch/arm/mach-exynos/pm.c          | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c | 1 -
 6 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/mach-exynos/common.h +0 -1
index e349a03..5365bf1 100644
@@ -12,7 +12,6 @@
 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
-#include <linux/of.h>
 #include <linux/platform_data/cpuidle-exynos.h>
 
 #define EXYNOS3250_SOC_ID	0xE3472000
arch/arm/mach-exynos/exynos.c +0 -0
index 99947ad..54262a1 100644
@@ -11,14 +11,10 @@
 
Quoted 13 lines

arch/arm/mach-exynos/exynos.c line 20

Quoted 9 lines
arch/arm/mach-exynos/exynos.c +0 -3
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>

platform_device is actually used in that file. It looks unused because it is pulled by of_platform, but it makes sense to include it here.

Thanks for review.

Well I tried to grep for of_platform.h and platform_device.h in arch/arm/ and out of 88 files including of_platform.h only 16 files are including platform_device.h also. So majority do not include both of them even do they need. So majority of files both are not included. So If we got with majority it's not required. What's your opinion?

Thanks,
Pankaj Dubey

Quoted 7 lines

Rest looks good.

BR,
Krzysztof

#12 lore raw

PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion

Quoted 51 lines · pankaj.dubey

Hi Krzysztof,

Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · Pankaj Dubey

This includes trivial cleanup in exynos files such as
- remove unused header files inclusion from exynos.c, s5p-dev-mfc.c, firmware.c, pm.c.
- move inclusion of of.h from common.h to pm.c where it is really required

---
 arch/arm/mach-exynos/common.h      | 1 -
 arch/arm/mach-exynos/exynos.c      | 5 -----
 arch/arm/mach-exynos/firmware.c    | 2 --
 arch/arm/mach-exynos/platsmp.c     | 1 -
 arch/arm/mach-exynos/pm.c          | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c | 1 -
 6 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/mach-exynos/common.h +0 -1
index e349a03..5365bf1 100644
@@ -12,7 +12,6 @@
 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
-#include <linux/of.h>
 #include <linux/platform_data/cpuidle-exynos.h>
 
 #define EXYNOS3250_SOC_ID	0xE3472000
arch/arm/mach-exynos/exynos.c +0 -0
index 99947ad..54262a1 100644
@@ -11,14 +11,10 @@
 
Quoted 13 lines

arch/arm/mach-exynos/exynos.c line 20

Quoted 9 lines
arch/arm/mach-exynos/exynos.c +0 -3
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>

platform_device is actually used in that file. It looks unused because it is pulled by of_platform, but it makes sense to include it here.

Quoted 7 lines

Thanks for review.

Well I tried to grep for of_platform.h and platform_device.h in arch/arm/ and out of 88 files including of_platform.h only 16 files are including platform_device.h also. So majority do not include both of them even do they need. So majority of files both are not included. So If we got with majority it's not required. What's your opinion?

Actually most of files including of_platform.h and not including platform_device.h just do not require the second one (I checked like 20 of them and only one was referring to platform device function... of course maybe my random selection of 20 files was not random enough :) ). They do not directly reference platform device stuff.

In that file the platform_device is used so the header may stay.

Best regards,
Krzysztof

#13 lore raw

PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion

Quoted 60 lines · Krzysztof Kozlowski
Quoted 51 lines · pankaj.dubey

Hi Krzysztof,

Quoted 35 lines · Krzysztof Kozlowski
Quoted 34 lines · Pankaj Dubey

This includes trivial cleanup in exynos files such as
- remove unused header files inclusion from exynos.c, s5p-dev-mfc.c, firmware.c, pm.c.
- move inclusion of of.h from common.h to pm.c where it is really required

---
 arch/arm/mach-exynos/common.h      | 1 -
 arch/arm/mach-exynos/exynos.c      | 5 -----
 arch/arm/mach-exynos/firmware.c    | 2 --
 arch/arm/mach-exynos/platsmp.c     | 1 -
 arch/arm/mach-exynos/pm.c          | 4 +---
 arch/arm/mach-exynos/s5p-dev-mfc.c | 1 -
 6 files changed, 1 insertion(+), 13 deletions(-)
arch/arm/mach-exynos/common.h +0 -1
index e349a03..5365bf1 100644
@@ -12,7 +12,6 @@
 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H
 
-#include <linux/of.h>
 #include <linux/platform_data/cpuidle-exynos.h>
 
 #define EXYNOS3250_SOC_ID	0xE3472000
arch/arm/mach-exynos/exynos.c +0 -0
index 99947ad..54262a1 100644
@@ -11,14 +11,10 @@
 
Quoted 13 lines

arch/arm/mach-exynos/exynos.c line 20

Quoted 9 lines
arch/arm/mach-exynos/exynos.c +0 -3
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
-#include <linux/platform_device.h>

platform_device is actually used in that file. It looks unused because it is pulled by of_platform, but it makes sense to include it here.

Quoted 7 lines

Thanks for review.

Well I tried to grep for of_platform.h and platform_device.h in arch/arm/ and out of 88 files including of_platform.h only 16 files are including platform_device.h also. So majority do not include both of them even do they need. So majority of files both are not included. So If we got with majority it's not required. What's your opinion?

Quoted 7 lines

Actually most of files including of_platform.h and not including platform_device.h just do not require the second one (I checked like 20 of them and only one was referring to platform device function... of course maybe my random selection of 20 files was not random enough :) ). They do not directly reference platform device stuff.

In that file the platform_device is used so the header may stay.

OK. will resend this again with keeping back platform_device.h in exynos.c file.

Thanks,
Pankaj Dubey

Quoted 4 lines

Best regards,
Krzysztof