hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBE9G7 --------------------------- There are two ret variables in copy_user_generic(). Remove the local ret variable in hygon if-condition to solve the build warning. Fixes: 0cd6fd52741f ["mm: Enhanced copy capabilities for Hygon processor"] Signed-off-by: Xinyu Zheng <zhengxinyu6@huawei.com> Cc: hygon-arch@list.openanolis.cn Cc: QIU ZHITENG <qiuzhiteng@hygon.cn> --- arch/x86/include/asm/uaccess_64.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index fa54b346929d..ad20cdc36851 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -104,12 +104,8 @@ copy_user_generic(void *to, const void *from, unsigned len) unsigned ret; /* Check if Hygon large memory copy support enabled. */ if (static_branch_unlikely(&hygon_lmc_key)) { - if (Hygon_LMC_check(len)) { - unsigned long ret; - - ret = copy_large_memory_generic_string(to, from, len); - return ret; - } + if (Hygon_LMC_check(len)) + return copy_large_memory_generic_string(to, from, len); } /* -- 2.34.1