Commit 4fa49aa9 authored by Max Filippov's avatar Max Filippov Committed by Khalid Elmously

xtensa: fix __sync_fetch_and_{and,or}_4 declarations

BugLink: https://bugs.launchpad.net/bugs/1889928

[ Upstream commit 73f99413 ]

Building xtensa kernel with gcc-10 produces the following warnings:
  arch/xtensa/kernel/xtensa_ksyms.c:90:15: warning: conflicting types
    for built-in function ‘__sync_fetch_and_and_4’;
    expected ‘unsigned int(volatile void *, unsigned int)’
    [-Wbuiltin-declaration-mismatch]
  arch/xtensa/kernel/xtensa_ksyms.c:96:15: warning: conflicting types
    for built-in function ‘__sync_fetch_and_or_4’;
    expected ‘unsigned int(volatile void *, unsigned int)’
    [-Wbuiltin-declaration-mismatch]

Fix declarations of these functions to avoid the warning.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 4ac44fc8
...@@ -82,13 +82,13 @@ void __xtensa_libgcc_window_spill(void) ...@@ -82,13 +82,13 @@ void __xtensa_libgcc_window_spill(void)
} }
EXPORT_SYMBOL(__xtensa_libgcc_window_spill); EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v) unsigned int __sync_fetch_and_and_4(volatile void *p, unsigned int v)
{ {
BUG(); BUG();
} }
EXPORT_SYMBOL(__sync_fetch_and_and_4); EXPORT_SYMBOL(__sync_fetch_and_and_4);
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v) unsigned int __sync_fetch_and_or_4(volatile void *p, unsigned int v)
{ {
BUG(); BUG();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment