All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of/mips: Cleanup some include directives/files.
@ 2010-10-19 22:50 ` David Daney
  0 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2010-10-19 22:50 UTC (permalink / raw)
  To: linux-mips, ralf, devicetree-discuss, grant.likely, linux-kernel
  Cc: David Daney, Dezhong Diao

The __init directives should go on the definitions of things, not the
declaration, also __init is meaningless for inline functions, so
remove it from prom.h.  This allows us to get rid of a useless
#include, but most of the rest of them are useless too, so kill them
as well.

If of_i2c.c needs irq definitions, it should include linux/irq.h
directly, not assume indirect inclusion via asm/prom.h.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Dezhong Diao <dediao@cisco.com>
---
 arch/mips/include/asm/prom.h |    8 ++------
 drivers/of/of_i2c.c          |    1 +
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h
index 23f8237..f29b862 100644
--- a/arch/mips/include/asm/prom.h
+++ b/arch/mips/include/asm/prom.h
@@ -12,10 +12,6 @@
 #define __ASM_MIPS_PROM_H
 
 #ifdef CONFIG_OF
-#include <linux/init.h>
-
-#include <asm/setup.h>
-#include <asm/irq.h>
 #include <asm/bootinfo.h>
 
 /* which is compatible with the flattened device tree (FDT) */
@@ -27,9 +23,9 @@ extern int early_init_dt_scan_memory_arch(unsigned long node,
 extern int reserve_mem_mach(unsigned long addr, unsigned long size);
 extern void free_mem_mach(unsigned long addr, unsigned long size);
 
-extern void __init device_tree_init(void);
+extern void device_tree_init(void);
 #else /* CONFIG_OF */
-static inline void __init device_tree_init(void) { }
+static inline void device_tree_init(void) { }
 #endif /* CONFIG_OF */
 
 #endif /* _ASM_MIPS_PROM_H */
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 0a694de..c85d3c7 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -12,6 +12,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/irq.h>
 #include <linux/of.h>
 #include <linux/of_i2c.h>
 #include <linux/of_irq.h>
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] of/mips: Cleanup some include directives/files.
@ 2010-10-19 22:50 ` David Daney
  0 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2010-10-19 22:50 UTC (permalink / raw)
  To: linux-mips-6z/3iImG2C8G8FEW9MqTrA, ralf-6z/3iImG2C8G8FEW9MqTrA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: David Daney

The __init directives should go on the definitions of things, not the
declaration, also __init is meaningless for inline functions, so
remove it from prom.h.  This allows us to get rid of a useless
#include, but most of the rest of them are useless too, so kill them
as well.

If of_i2c.c needs irq definitions, it should include linux/irq.h
directly, not assume indirect inclusion via asm/prom.h.

Signed-off-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Cc: Dezhong Diao <dediao-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
 arch/mips/include/asm/prom.h |    8 ++------
 drivers/of/of_i2c.c          |    1 +
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h
index 23f8237..f29b862 100644
--- a/arch/mips/include/asm/prom.h
+++ b/arch/mips/include/asm/prom.h
@@ -12,10 +12,6 @@
 #define __ASM_MIPS_PROM_H
 
 #ifdef CONFIG_OF
-#include <linux/init.h>
-
-#include <asm/setup.h>
-#include <asm/irq.h>
 #include <asm/bootinfo.h>
 
 /* which is compatible with the flattened device tree (FDT) */
@@ -27,9 +23,9 @@ extern int early_init_dt_scan_memory_arch(unsigned long node,
 extern int reserve_mem_mach(unsigned long addr, unsigned long size);
 extern void free_mem_mach(unsigned long addr, unsigned long size);
 
-extern void __init device_tree_init(void);
+extern void device_tree_init(void);
 #else /* CONFIG_OF */
-static inline void __init device_tree_init(void) { }
+static inline void device_tree_init(void) { }
 #endif /* CONFIG_OF */
 
 #endif /* _ASM_MIPS_PROM_H */
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 0a694de..c85d3c7 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -12,6 +12,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/irq.h>
 #include <linux/of.h>
 #include <linux/of_i2c.h>
 #include <linux/of_irq.h>
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/mips: Cleanup some include directives/files.
  2010-10-19 22:50 ` David Daney
  (?)
@ 2010-10-20  6:58 ` Ralf Baechle
  2010-10-20 18:03     ` Grant Likely
  -1 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2010-10-20  6:58 UTC (permalink / raw)
  To: David Daney
  Cc: linux-mips, devicetree-discuss, grant.likely, linux-kernel,
	Dezhong Diao

On Tue, Oct 19, 2010 at 03:50:31PM -0700, David Daney wrote:

> The __init directives should go on the definitions of things, not the
> declaration, also __init is meaningless for inline functions, so
> remove it from prom.h.  This allows us to get rid of a useless
> #include, but most of the rest of them are useless too, so kill them
> as well.
> 
> If of_i2c.c needs irq definitions, it should include linux/irq.h
> directly, not assume indirect inclusion via asm/prom.h.

Grant, I assume you're going to merge this one.

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/mips: Cleanup some include directives/files.
@ 2010-10-20 18:03     ` Grant Likely
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2010-10-20 18:03 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: David Daney, linux-mips, devicetree-discuss, linux-kernel,
	Dezhong Diao

On Wed, Oct 20, 2010 at 07:58:30AM +0100, Ralf Baechle wrote:
> On Tue, Oct 19, 2010 at 03:50:31PM -0700, David Daney wrote:
> 
> > The __init directives should go on the definitions of things, not the
> > declaration, also __init is meaningless for inline functions, so
> > remove it from prom.h.  This allows us to get rid of a useless
> > #include, but most of the rest of them are useless too, so kill them
> > as well.
> > 
> > If of_i2c.c needs irq definitions, it should include linux/irq.h
> > directly, not assume indirect inclusion via asm/prom.h.
> 
> Grant, I assume you're going to merge this one.
> 
> Acked-by: Ralf Baechle <ralf@linux-mips.org>

Yes, I'll pick it up.  I'm compile testing now.

g.

> 
>   Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of/mips: Cleanup some include directives/files.
@ 2010-10-20 18:03     ` Grant Likely
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2010-10-20 18:03 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, David Daney,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed, Oct 20, 2010 at 07:58:30AM +0100, Ralf Baechle wrote:
> On Tue, Oct 19, 2010 at 03:50:31PM -0700, David Daney wrote:
> 
> > The __init directives should go on the definitions of things, not the
> > declaration, also __init is meaningless for inline functions, so
> > remove it from prom.h.  This allows us to get rid of a useless
> > #include, but most of the rest of them are useless too, so kill them
> > as well.
> > 
> > If of_i2c.c needs irq definitions, it should include linux/irq.h
> > directly, not assume indirect inclusion via asm/prom.h.
> 
> Grant, I assume you're going to merge this one.
> 
> Acked-by: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>

Yes, I'll pick it up.  I'm compile testing now.

g.

> 
>   Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-20 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 22:50 [PATCH] of/mips: Cleanup some include directives/files David Daney
2010-10-19 22:50 ` David Daney
2010-10-20  6:58 ` Ralf Baechle
2010-10-20 18:03   ` Grant Likely
2010-10-20 18:03     ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.