All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] arm/ftrace: Remove the unneeded result variable
@ 2022-08-26  7:26 ` cgel.zte
  0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-08-26  7:26 UTC (permalink / raw)
  To: linux
  Cc: rostedt, mingo, linux-arm-kernel, linux-kernel, ye xingchen, Zeal Robot

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH linux-next] arm/ftrace: Remove the unneeded result variable
@ 2022-08-26  7:26 ` cgel.zte
  0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-08-26  7:26 UTC (permalink / raw)
  To: linux
  Cc: rostedt, mingo, linux-arm-kernel, linux-kernel, ye xingchen, Zeal Robot

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-26  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26  7:26 [PATCH linux-next] arm/ftrace: Remove the unneeded result variable cgel.zte
2022-08-26  7:26 ` cgel.zte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.