[PATCH OLK-5.10] x86: fix duplicate ret variable in copy_user_generic
hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9151 --------------------------- 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> --- 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
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/22403 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/PVQ... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/22403 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/PVQ...
participants (2)
-
patchwork bot -
Xinyu Zheng