提交 8af42949 编写于 作者: S Stafford Horne

openrisc: xchg: fix `computed is not used` warning

When building allmodconfig this warning shows.

  fs/ocfs2/file.c: In function 'ocfs2_file_write_iter':
  ./arch/openrisc/include/asm/cmpxchg.h:81:3: warning: value computed is
  not used [-Wunused-value]
    ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr))))
     ^

Applying the same patch logic that was done to the cmpxchg macro.
Signed-off-by: NStafford Horne <shorne@gmail.com>
上级 4495c08e
...@@ -78,6 +78,10 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr, ...@@ -78,6 +78,10 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
} }
#define xchg(ptr, with) \ #define xchg(ptr, with) \
((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) ({ \
(__typeof__(*(ptr))) __xchg((unsigned long)(with), \
(ptr), \
sizeof(*(ptr))); \
})
#endif /* __ASM_OPENRISC_CMPXCHG_H */ #endif /* __ASM_OPENRISC_CMPXCHG_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册