ARM: EXYNOS: Trivial cleanup in mach-exynos
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
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
@@ -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
Krzysztof Kozlowski
AppliedPATCH 1/3 ARM: EXYNOS: correct header comment in Kconfig file
Quoted 7 lines · Pankaj Dubey
This patch corrects header comment of
Kconfigfile by changing EXYNOS4 to EXYNOS.Signed-off-by Pankaj Dubey <[email protected]>--- arch/arm/mach-exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied.
Krzysztof
PATCH 2/3 ARM: EXYNOS: remove unused register offset definition
In reply to Pankaj DubeyThis 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
@@ -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
PATCH 2/3 ARM: EXYNOS: remove unused register offset definition
Quoted 22 lines · Pankaj Dubey
This patch cleans up
map.hby removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.Signed-off-by Pankaj Dubey <[email protected]>--- 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@@ -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
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.hby removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.Signed-off-by Pankaj Dubey <[email protected]>--- 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@@ -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_OFFSETis used inplat/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
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.hby removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.Signed-off-by Pankaj Dubey <[email protected]>--- 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@@ -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_OFFSETis used inplat/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 fromplat/map-s5p.h.
That would be good.
Quoted 4 lines
Only platform using
S3C_UART_OFFSETis s3c64xx and its using definition frommap-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal ofS3C_UART_OFFSETfrommap-s5p.candmap.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
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.hby removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.Signed-off-by Pankaj Dubey <[email protected]>--- 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@@ -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_OFFSETis used inplat/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_OFFSETwas defined to0x10000, after (because of #ifndef) it will be0x400. 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 fromplat/map-s5p.h.That would be good.
Quoted 4 lines
Only platform using
S3C_UART_OFFSETis s3c64xx and its using definition frommap-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal ofS3C_UART_OFFSETfrommap-s5p.candmap.h.
Quoted 9 lines
The compilation is not a test. You compiled something like this:
-#defineS3C_UART_OFFSET(0x10000)
#ifndefS3C_UART_OFFSET
#defineS3C_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
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.hby removing unused register offset and changing EXYNOS4 to EXYNOS in header comment section.Signed-off-by Pankaj Dubey <[email protected]>--- 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@@ -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_OFFSETis used inplat/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_OFFSETwas defined to0x10000, after (because of #ifndef) it will be0x400. 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 fromplat/map-s5p.h.That would be good.
Quoted 4 lines
Only platform using
S3C_UART_OFFSETis s3c64xx and its using definition frommap-s3c.h. I have compiled all related platform defconfigs and found no issues because of removal ofS3C_UART_OFFSETfrommap-s5p.candmap.h.Quoted 9 lines
The compilation is not a test. You compiled something like this:
-#defineS3C_UART_OFFSET(0x10000)
#ifndefS3C_UART_OFFSET
#defineS3C_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} andmach-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
PATCH 3/3 ARM: EXYNOS: cleanup header files inclusion
In reply to Pankaj DubeyThis 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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 fromexynos.c,s5p-dev-mfc.c,firmware.c,pm.c.
- move inclusion ofof.hfromcommon.htopm.cwhere it is really requiredSigned-off-by Pankaj Dubey <[email protected]>--- 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@@ -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 0xE3472000arch/arm/mach-exynos/exynos.c +0
-0
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
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 fromexynos.c,s5p-dev-mfc.c,firmware.c,pm.c.
- move inclusion ofof.hfromcommon.htopm.cwhere it is really requiredSigned-off-by Pankaj Dubey <[email protected]>--- 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@@ -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 0xE3472000arch/arm/mach-exynos/exynos.c +0
-0@@ -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_deviceis actually used in that file. It looks unused because it is pulled byof_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
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 fromexynos.c,s5p-dev-mfc.c,firmware.c,pm.c.
- move inclusion ofof.hfromcommon.htopm.cwhere it is really requiredSigned-off-by Pankaj Dubey <[email protected]>--- 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@@ -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 0xE3472000arch/arm/mach-exynos/exynos.c +0
-0@@ -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_deviceis actually used in that file. It looks unused because it is pulled byof_platform, but it makes sense to include it here.
Quoted 7 lines
Thanks for review.
Well I tried to grep for
of_platform.handplatform_device.hinarch/arm/and out of 88 files includingof_platform.honly 16 files are includingplatform_device.halso. 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
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 fromexynos.c,s5p-dev-mfc.c,firmware.c,pm.c.
- move inclusion ofof.hfromcommon.htopm.cwhere it is really requiredSigned-off-by Pankaj Dubey <[email protected]>--- 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@@ -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 0xE3472000arch/arm/mach-exynos/exynos.c +0
-0@@ -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_deviceis actually used in that file. It looks unused because it is pulled byof_platform, but it makes sense to include it here.Quoted 7 lines
Thanks for review.
Well I tried to grep for
of_platform.handplatform_device.hinarch/arm/and out of 88 files includingof_platform.honly 16 files are includingplatform_device.halso. 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.hand not includingplatform_device.hjust 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_deviceis 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