Linux PARISC architecture development
 help / color / mirror / Atom feed
* [PATCH] parisc: drop unnecessary cast in __ldcw_align() macro
@ 2010-02-02 19:06 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2010-02-02 19:06 UTC (permalink / raw)
  To: linux-parisc, Kyle McMartin

__ldcw_align() can directly access the slock member of struct arch_spinlock_t
instead of using an ugly cast.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/include/asm/system.h b/arch/parisc/include/asm/system.h
--- a/arch/parisc/include/asm/system.h
+++ b/arch/parisc/include/asm/system.h
@@ -160,7 +160,7 @@ static inline void set_eiem(unsigned long val)
    ldcd). */
 
 #define __PA_LDCW_ALIGNMENT	4
-#define __ldcw_align(a) ((volatile unsigned int *)a)
+#define __ldcw_align(a) (&(a)->slock)
 #define __LDCW	"ldcw,co"
 
 #endif /*!CONFIG_PA20*/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-02 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 19:06 [PATCH] parisc: drop unnecessary cast in __ldcw_align() macro Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox