diff mbox

[3/3] ARM: EXYNOS: cleanup header files inclusion

Message ID 1456135396-17767-4-git-send-email-pankaj.dubey@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pankaj Dubey Feb. 22, 2016, 10:03 a.m. UTC
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

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
 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(-)

Comments

Krzysztof Kozlowski Feb. 23, 2016, 12:09 a.m. UTC | #1
On 22.02.2016 19:03, Pankaj Dubey wrote:
> 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
> 
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  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(-)
> 
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index e349a03..5365bf1 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -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
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 99947ad..54262a1 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -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
Pankaj Dubey Feb. 23, 2016, 9:17 a.m. UTC | #2
Hi Krzysztof,

On Tuesday 23 February 2016 05:39 AM, Krzysztof Kozlowski wrote:
> On 22.02.2016 19:03, Pankaj Dubey wrote:
>> 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
>>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>>  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(-)
>>
>> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
>> index e349a03..5365bf1 100644
>> --- a/arch/arm/mach-exynos/common.h
>> +++ b/arch/arm/mach-exynos/common.h
>> @@ -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
>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>> index 99947ad..54262a1 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -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.
>
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

> Rest looks good.
> 

> BR,
> Krzysztof
> 
>
Krzysztof Kozlowski Feb. 24, 2016, 1:02 a.m. UTC | #3
On 23.02.2016 18:17, pankaj.dubey wrote:
> Hi Krzysztof,
> 
> On Tuesday 23 February 2016 05:39 AM, Krzysztof Kozlowski wrote:
>> On 22.02.2016 19:03, Pankaj Dubey wrote:
>>> 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
>>>
>>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>>> ---
>>>  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(-)
>>>
>>> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
>>> index e349a03..5365bf1 100644
>>> --- a/arch/arm/mach-exynos/common.h
>>> +++ b/arch/arm/mach-exynos/common.h
>>> @@ -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
>>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>>> index 99947ad..54262a1 100644
>>> --- a/arch/arm/mach-exynos/exynos.c
>>> +++ b/arch/arm/mach-exynos/exynos.c
>>> @@ -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.
>>
> 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
Pankaj Dubey Feb. 24, 2016, 4:01 a.m. UTC | #4
On Wednesday 24 February 2016 06:32 AM, Krzysztof Kozlowski wrote:
> On 23.02.2016 18:17, pankaj.dubey wrote:
>> Hi Krzysztof,
>>
>> On Tuesday 23 February 2016 05:39 AM, Krzysztof Kozlowski wrote:
>>> On 22.02.2016 19:03, Pankaj Dubey wrote:
>>>> 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
>>>>
>>>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>>>> ---
>>>>  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(-)
>>>>
>>>> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
>>>> index e349a03..5365bf1 100644
>>>> --- a/arch/arm/mach-exynos/common.h
>>>> +++ b/arch/arm/mach-exynos/common.h
>>>> @@ -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
>>>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>>>> index 99947ad..54262a1 100644
>>>> --- a/arch/arm/mach-exynos/exynos.c
>>>> +++ b/arch/arm/mach-exynos/exynos.c
>>>> @@ -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.
>>>
>> 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.

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

Thanks,
Pankaj Dubey
> 
> Best regards,
> Krzysztof
>
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index e349a03..5365bf1 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -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
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 99947ad..54262a1 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -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>
 
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 111cfbf..1bfd1b0 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -20,8 +20,6 @@ 
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/suspend.h>
 
-#include <mach/map.h>
-
 #include "common.h"
 #include "smc.h"
 
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index da46c63..85c3be6 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -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>
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index b9b9186..c43b776 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -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)
diff --git a/arch/arm/mach-exynos/s5p-dev-mfc.c b/arch/arm/mach-exynos/s5p-dev-mfc.c
index 0b04b6b..8ef1f3e 100644
--- a/arch/arm/mach-exynos/s5p-dev-mfc.c
+++ b/arch/arm/mach-exynos/s5p-dev-mfc.c
@@ -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>