diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-03-23 14:35:23 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-03-26 08:35:36 -0400 |
commit | 9efb85c5cfac7e1f0caae4471446d936ff2163fe (patch) | |
tree | 2ff4c55663b08922ccc6d2faca5e5695d45a5e6f /kernel/trace/ftrace.c | |
parent | 3dee10da2e9ff220e054a8f158cc296c797fbe81 (diff) |
ftrace: Fix warning using plain integer as NULL & spelling corrections
Changed 0 --> NULL to avoid sparse warning
Corrected spelling mistakes reported by checkpatch.pl
Sparse warning below:
sudo make C=2 CF=-D__CHECK_ENDIAN__ M=kernel/trace
CHECK kernel/trace/ftrace.c
kernel/trace/ftrace.c:3007:24: warning: Using plain integer as NULL pointer
kernel/trace/ftrace.c:4758:37: warning: Using plain integer as NULL pointer
Link: http://lkml.kernel.org/r/20190323183523.GA2244@hari-Inspiron-1545
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index fa79323331b2..26c8ca9bd06b 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1992,7 +1992,7 @@ static void print_bug_type(void) | |||
1992 | * modifying the code. @failed should be one of either: | 1992 | * modifying the code. @failed should be one of either: |
1993 | * EFAULT - if the problem happens on reading the @ip address | 1993 | * EFAULT - if the problem happens on reading the @ip address |
1994 | * EINVAL - if what is read at @ip is not what was expected | 1994 | * EINVAL - if what is read at @ip is not what was expected |
1995 | * EPERM - if the problem happens on writting to the @ip address | 1995 | * EPERM - if the problem happens on writing to the @ip address |
1996 | */ | 1996 | */ |
1997 | void ftrace_bug(int failed, struct dyn_ftrace *rec) | 1997 | void ftrace_bug(int failed, struct dyn_ftrace *rec) |
1998 | { | 1998 | { |
@@ -2391,7 +2391,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | |||
2391 | return ftrace_modify_call(rec, ftrace_old_addr, ftrace_addr); | 2391 | return ftrace_modify_call(rec, ftrace_old_addr, ftrace_addr); |
2392 | } | 2392 | } |
2393 | 2393 | ||
2394 | return -1; /* unknow ftrace bug */ | 2394 | return -1; /* unknown ftrace bug */ |
2395 | } | 2395 | } |
2396 | 2396 | ||
2397 | void __weak ftrace_replace_code(int mod_flags) | 2397 | void __weak ftrace_replace_code(int mod_flags) |
@@ -3004,7 +3004,7 @@ ftrace_allocate_pages(unsigned long num_to_init) | |||
3004 | int cnt; | 3004 | int cnt; |
3005 | 3005 | ||
3006 | if (!num_to_init) | 3006 | if (!num_to_init) |
3007 | return 0; | 3007 | return NULL; |
3008 | 3008 | ||
3009 | start_pg = pg = kzalloc(sizeof(*pg), GFP_KERNEL); | 3009 | start_pg = pg = kzalloc(sizeof(*pg), GFP_KERNEL); |
3010 | if (!pg) | 3010 | if (!pg) |
@@ -4755,7 +4755,7 @@ static int | |||
4755 | ftrace_set_addr(struct ftrace_ops *ops, unsigned long ip, int remove, | 4755 | ftrace_set_addr(struct ftrace_ops *ops, unsigned long ip, int remove, |
4756 | int reset, int enable) | 4756 | int reset, int enable) |
4757 | { | 4757 | { |
4758 | return ftrace_set_hash(ops, 0, 0, ip, remove, reset, enable); | 4758 | return ftrace_set_hash(ops, NULL, 0, ip, remove, reset, enable); |
4759 | } | 4759 | } |
4760 | 4760 | ||
4761 | /** | 4761 | /** |
@@ -5463,7 +5463,7 @@ void ftrace_create_filter_files(struct ftrace_ops *ops, | |||
5463 | 5463 | ||
5464 | /* | 5464 | /* |
5465 | * The name "destroy_filter_files" is really a misnomer. Although | 5465 | * The name "destroy_filter_files" is really a misnomer. Although |
5466 | * in the future, it may actualy delete the files, but this is | 5466 | * in the future, it may actually delete the files, but this is |
5467 | * really intended to make sure the ops passed in are disabled | 5467 | * really intended to make sure the ops passed in are disabled |
5468 | * and that when this function returns, the caller is free to | 5468 | * and that when this function returns, the caller is free to |
5469 | * free the ops. | 5469 | * free the ops. |
@@ -5786,7 +5786,7 @@ void ftrace_module_enable(struct module *mod) | |||
5786 | /* | 5786 | /* |
5787 | * If the tracing is enabled, go ahead and enable the record. | 5787 | * If the tracing is enabled, go ahead and enable the record. |
5788 | * | 5788 | * |
5789 | * The reason not to enable the record immediatelly is the | 5789 | * The reason not to enable the record immediately is the |
5790 | * inherent check of ftrace_make_nop/ftrace_make_call for | 5790 | * inherent check of ftrace_make_nop/ftrace_make_call for |
5791 | * correct previous instructions. Making first the NOP | 5791 | * correct previous instructions. Making first the NOP |
5792 | * conversion puts the module to the correct state, thus | 5792 | * conversion puts the module to the correct state, thus |