xtensa: fix xtensa_wsr always writing 0
[sfrench/cifs-2.6.git] / arch / xtensa / include / asm / processor.h
index ba62bbcea160e1891267bddb9f1deae6c56122c9..67ccc3d48c8cff4a0b5d9f9a79cd1d92c7770246 100644 (file)
@@ -242,8 +242,8 @@ extern unsigned long __get_wchan(struct task_struct *p);
 
 #define xtensa_set_sr(x, sr) \
        ({ \
-        unsigned int v = (unsigned int)(x); \
-        __asm__ __volatile__ ("wsr %0, "__stringify(sr) :: "a"(v)); \
+        __asm__ __volatile__ ("wsr %0, "__stringify(sr) :: \
+                              "a"((unsigned int)(x))); \
         })
 
 #define xtensa_get_sr(sr) \