From: cgel.zte@gmail.com
To: linux@armlinux.org.uk
Cc: rostedt@goodmis.org, mingo@redhat.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
ye xingchen <ye.xingchen@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] arm/ftrace: Remove the unneeded result variable
Date: Fri, 26 Aug 2022 07:26:03 +0000 [thread overview]
Message-ID: <20220826072603.252909-1-ye.xingchen@zte.com.cn> (raw)
From: ye xingchen <ye.xingchen@zte.com.cn>
Return the value ftrace_modify_code() directly instead of storing it in
another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
arch/arm/kernel/ftrace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index a0b6d1e3812f..94924a2ecd94 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -190,7 +190,6 @@ int ftrace_make_nop(struct module *mod,
unsigned long ip = rec->ip;
unsigned long old;
unsigned long new;
- int ret;
#ifdef CONFIG_ARM_MODULE_PLTS
/* mod is only supplied during module loading */
@@ -216,9 +215,8 @@ int ftrace_make_nop(struct module *mod,
* so validation may fail spuriously in such cases. Let's work around
* this by omitting those from validation.
*/
- ret = ftrace_modify_code(ip, old, new, !is_kernel_inittext(ip));
- return ret;
+ return ftrace_modify_code(ip, old, new, !is_kernel_inittext(ip));
}
#endif /* CONFIG_DYNAMIC_FTRACE */
--
2.25.1
reply other threads:[~2022-08-26 7:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220826072603.252909-1-ye.xingchen@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=ye.xingchen@zte.com.cn \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).