Thread (37 messages) flat view 37 messages, 11 authors, 2012-02-11
STALE5296d

[PATCH v6 02/15] ARM: SoC: Add per SoC SMP and CPU hotplug operations

From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-02-10 00:03:29

On Wednesday 08 February 2012, David Brown wrote:
On Wed, Feb 08, 2012 at 12:30:46AM +0000, Marc Zyngier wrote:
quoted
+#ifdef CONFIG_SMP
+#define soc_smp_init_ops(ops)                .smp_init_ops = &(ops),
+#define soc_smp_ops(ops)             .smp_ops = &(ops),
+extern void soc_smp_ops_register(struct arm_soc_smp_init_ops *,
+                              struct arm_soc_smp_ops *);
+#else
+#define soc_smp_init_ops(ops)                /* empty */
+#define soc_smp_ops(ops)             /* empty */
+#define soc_smp_ops_register(a,b)    do {} while(0)
+#endif
I'm not sure if this bothers anyone else, but these macros mess up
editors that know how to indent C code, since the comma ends up inside
the macro.  I'm not sure I have a better idea, though.
I would recommend following the pattern from __devexit_p() and make this

#ifdef CONFIG_SMP
#define soc_smp_init_ops(ops)      &(ops)
#else
#define soc_smp_init_ops(ops)      NULL
#endif

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help