MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/83aa53eb5f34f48e6ff24aee02f879b50c949982
Commit:     83aa53eb5f34f48e6ff24aee02f879b50c949982
Parent:     2e6522c565522a2e18409c315c49d78c8b74807b
Refname:    refs/heads/master
Author:     Mathieu Malaterre <[email protected]>
AuthorDate: Wed Jan 17 12:31:57 2018 +0100
Committer:  James Hogan <[email protected]>
CommitDate: Thu Jan 18 21:59:24 2018 +0000

    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]>
    Reviewed-by: James Hogan <[email protected]>
    Cc: Ralf Baechle <[email protected]>
    Cc: Steven Rostedt <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: [email protected]
    Patchwork: https://patchwork.linux-mips.org/patch/18494/
    Signed-off-by: James Hogan <[email protected]>
---
 arch/mips/kernel/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 99285be0e088..7f3dfdbc3657 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -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; */
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.