Patch "parisc: Fix compiler warnings in debug_core.c" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    parisc: Fix compiler warnings in debug_core.c

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     parisc-fix-compiler-warnings-in-debug_core.c.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2e7398729798194be9dc651688c7c43594ee7bec
Author: Helge Deller <deller@xxxxxx>
Date:   Fri Dec 20 21:00:19 2019 +0100

    parisc: Fix compiler warnings in debug_core.c
    
    [ Upstream commit 75cf9797006a3a9f29a3a25c1febd6842a4a9eb2 ]
    
    Fix this compiler warning:
    kernel/debug/debug_core.c: In function â??kgdb_cpu_enterâ??:
    arch/parisc/include/asm/cmpxchg.h:48:3: warning: value computed is not used [-Wunused-value]
       48 |  ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
    arch/parisc/include/asm/atomic.h:78:30: note: in expansion of macro â??xchgâ??
       78 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
          |                              ^~~~
    kernel/debug/debug_core.c:596:4: note: in expansion of macro â??atomic_xchgâ??
      596 |    atomic_xchg(&kgdb_active, cpu);
          |    ^~~~~~~~~~~
    
    Signed-off-by: Helge Deller <deller@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/parisc/include/asm/cmpxchg.h b/arch/parisc/include/asm/cmpxchg.h
index 0a90b965cccb..9849bef2a766 100644
--- a/arch/parisc/include/asm/cmpxchg.h
+++ b/arch/parisc/include/asm/cmpxchg.h
@@ -43,8 +43,14 @@ __xchg(unsigned long x, __volatile__ void *ptr, int size)
 **		if (((unsigned long)p & 0xf) == 0)
 **			return __ldcw(p);
 */
-#define xchg(ptr, x) \
-	((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
+#define xchg(ptr, x)							\
+({									\
+	__typeof__(*(ptr)) __ret;					\
+	__typeof__(*(ptr)) _x_ = (x);					\
+	__ret = (__typeof__(*(ptr)))					\
+		__xchg((unsigned long)_x_, (ptr), sizeof(*(ptr)));	\
+	__ret;								\
+})
 
 /* bug catcher for when unsupported size is used - won't link */
 extern void __cmpxchg_called_with_bad_pointer(void);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux