MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return
PATCH 1/1 MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return
Replace pointer comparison to 0 with NULL in prepare_ftrace_return to improve code readability. Identified with coccinelle script 'badzero.cocci'.
Signed-off-by Mathieu Malaterre <[email protected]>
--- arch/mips/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/ftrace.c +1 -1
@@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,* If fails when getting the stack address of the non-leaf function's * ra, stop function graph tracer and return */ -if (parent_ra_addr ==0 ) +if (parent_ra_addr ==NULL ) goto out;#endif /* *parent_ra_addr = return_hooker; */
Signature · 1 line
2.11.0
Quoted 5 lines · Mathieu Malaterre
Replace pointer comparison to 0 with NULL in
prepare_ftrace_returnto improve code readability. Identified with coccinelle script 'badzero.cocci'.Signed-off-by Mathieu Malaterre <[email protected]>
Reviewed-by James Hogan <[email protected]>
Cheers
James
Quoted 21 lines
--- arch/mips/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/kernel/ftrace.c +1
-1@@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,* If fails when getting the stack address of the non-leaf function's * ra, stop function graph tracer and return */ -if (parent_ra_addr ==0 ) +if (parent_ra_addr ==NULL ) goto out;#endif /* *parent_ra_addr = return_hooker; */ Signature · 1 line
2.11.0
James Hogan
AppliedQuoted 5 lines · Mathieu Malaterre
Replace pointer comparison to 0 with NULL in
prepare_ftrace_returnto improve code readability. Identified with coccinelle script 'badzero.cocci'.Signed-off-by Mathieu Malaterre <[email protected]>
I've applied to my 4.16 branch,
Thanks
James
Quoted 21 lines
--- arch/mips/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/kernel/ftrace.c +1
-1@@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,* If fails when getting the stack address of the non-leaf function's * ra, stop function graph tracer and return */ -if (parent_ra_addr ==0 ) +if (parent_ra_addr ==NULL ) goto out;#endif /* *parent_ra_addr = return_hooker; */ Signature · 1 line
2.11.0