CC: [email protected]
CC: [email protected]
TO: Tom Zanussi <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zanussi/linux-trace.git 
ftrace/cleanup-hist-func-v4
head:   c62ecf84dee35ff23b14ae3db0bb0006c35caff7
commit: c62ecf84dee35ff23b14ae3db0bb0006c35caff7 [4/4] tracing: Have existing 
event_command.parse() implementations use helpers
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: x86_64-randconfig-m001-20211210 
(https://download.01.org/0day-ci/archive/20211211/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
kernel/trace/trace_events_trigger.c:1007 event_trigger_parse() error: 
uninitialized symbol 'trigger_ops'.
kernel/trace/trace_events_trigger.c:1736 event_enable_trigger_parse() error: 
uninitialized symbol 'trigger_data'.

vim +/trigger_ops +1007 kernel/trace/trace_events_trigger.c

4579e8fbf60ca9 Tom Zanussi              2021-11-05   963  
4579e8fbf60ca9 Tom Zanussi              2021-11-05   964  /*
4579e8fbf60ca9 Tom Zanussi              2021-11-05   965   * End event trigger 
parsing helper functions.
4579e8fbf60ca9 Tom Zanussi              2021-11-05   966   */
4579e8fbf60ca9 Tom Zanussi              2021-11-05   967  
2a2df321158817 Tom Zanussi              2013-10-24   968  /**
7784e321840752 Tom Zanussi              2021-12-09   969   * 
event_trigger_parse - Generic event_command @parse implementation
2a2df321158817 Tom Zanussi              2013-10-24   970   * @cmd_ops: The 
command ops, used for trigger registration
7f1d2f8210195c Steven Rostedt (Red Hat  2015-05-05   971)  * @file: The 
trace_event_file associated with the event
2a2df321158817 Tom Zanussi              2013-10-24   972   * @glob: The raw 
string used to register the trigger
2a2df321158817 Tom Zanussi              2013-10-24   973   * @cmd: The cmd 
portion of the string used to register the trigger
c62ecf84dee35f Tom Zanussi              2021-11-05   974   * @param_and_filter: 
The param and filter portion of the string used to register the trigger
2a2df321158817 Tom Zanussi              2013-10-24   975   *
2a2df321158817 Tom Zanussi              2013-10-24   976   * Common 
implementation for event command parsing and trigger
2a2df321158817 Tom Zanussi              2013-10-24   977   * instantiation.
2a2df321158817 Tom Zanussi              2013-10-24   978   *
7784e321840752 Tom Zanussi              2021-12-09   979   * Usually used 
directly as the @parse method in event command
2a2df321158817 Tom Zanussi              2013-10-24   980   * implementations.
2a2df321158817 Tom Zanussi              2013-10-24   981   *
2a2df321158817 Tom Zanussi              2013-10-24   982   * Return: 0 on 
success, errno otherwise
2a2df321158817 Tom Zanussi              2013-10-24   983   */
2a2df321158817 Tom Zanussi              2013-10-24   984  static int
7784e321840752 Tom Zanussi              2021-12-09   985  
event_trigger_parse(struct event_command *cmd_ops,
7f1d2f8210195c Steven Rostedt (Red Hat  2015-05-05   986)                   
struct trace_event_file *file,
c62ecf84dee35f Tom Zanussi              2021-11-05   987                    
char *glob, char *cmd, char *param_and_filter)
2a2df321158817 Tom Zanussi              2013-10-24   988  {
2a2df321158817 Tom Zanussi              2013-10-24   989        struct 
event_trigger_data *trigger_data;
2a2df321158817 Tom Zanussi              2013-10-24   990        struct 
event_trigger_ops *trigger_ops;
c62ecf84dee35f Tom Zanussi              2021-11-05   991        char *param, 
*filter;
c62ecf84dee35f Tom Zanussi              2021-11-05   992        bool remove;
2a2df321158817 Tom Zanussi              2013-10-24   993        int ret;
2a2df321158817 Tom Zanussi              2013-10-24   994  
c62ecf84dee35f Tom Zanussi              2021-11-05   995        remove = 
event_trigger_check_remove(glob);
2a2df321158817 Tom Zanussi              2013-10-24   996  
c62ecf84dee35f Tom Zanussi              2021-11-05   997        ret = 
event_trigger_separate_filter(param_and_filter, &param, &filter, false);
c62ecf84dee35f Tom Zanussi              2021-11-05   998        if (ret)
c62ecf84dee35f Tom Zanussi              2021-11-05   999                return 
ret;
2a2df321158817 Tom Zanussi              2013-10-24  1000  
2a2df321158817 Tom Zanussi              2013-10-24  1001        ret = -ENOMEM;
c62ecf84dee35f Tom Zanussi              2021-11-05  1002        trigger_data = 
event_trigger_alloc(cmd_ops, cmd, param, file);
2a2df321158817 Tom Zanussi              2013-10-24  1003        if 
(!trigger_data)
2a2df321158817 Tom Zanussi              2013-10-24  1004                goto 
out;
2a2df321158817 Tom Zanussi              2013-10-24  1005  
c62ecf84dee35f Tom Zanussi              2021-11-05  1006        if (remove) {
2a2df321158817 Tom Zanussi              2013-10-24 @1007                
cmd_ops->unreg(glob+1, trigger_ops, trigger_data, file);
2a2df321158817 Tom Zanussi              2013-10-24  1008                
kfree(trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1009                ret = 0;
2a2df321158817 Tom Zanussi              2013-10-24  1010                goto 
out;
2a2df321158817 Tom Zanussi              2013-10-24  1011        }
2a2df321158817 Tom Zanussi              2013-10-24  1012  
c62ecf84dee35f Tom Zanussi              2021-11-05  1013        ret = 
event_trigger_parse_num(param, trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1014        if (ret)
2a2df321158817 Tom Zanussi              2013-10-24  1015                goto 
out_free;
2a2df321158817 Tom Zanussi              2013-10-24  1016  
c62ecf84dee35f Tom Zanussi              2021-11-05  1017        ret = 
event_trigger_set_filter(cmd_ops, file, filter, trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1018        if (ret < 0)
2a2df321158817 Tom Zanussi              2013-10-24  1019                goto 
out_free;
2a2df321158817 Tom Zanussi              2013-10-24  1020  
1863c387259b62 Steven Rostedt (VMware   2018-07-24  1021)       /* Up the 
trigger_data count to make sure reg doesn't free it on failure */
1863c387259b62 Steven Rostedt (VMware   2018-07-24  1022)       
event_trigger_init(trigger_ops, trigger_data);
c62ecf84dee35f Tom Zanussi              2021-11-05  1023  
c62ecf84dee35f Tom Zanussi              2021-11-05  1024        ret = 
event_trigger_register(cmd_ops, file, glob, cmd, param, trigger_data, NULL);
c62ecf84dee35f Tom Zanussi              2021-11-05  1025        if (ret)
c62ecf84dee35f Tom Zanussi              2021-11-05  1026                goto 
out_free;
1863c387259b62 Steven Rostedt (VMware   2018-07-24  1027) 
1863c387259b62 Steven Rostedt (VMware   2018-07-24  1028)       /* Down the 
counter of trigger_data or free it if not used anymore */
1863c387259b62 Steven Rostedt (VMware   2018-07-24  1029)       
event_trigger_free(trigger_ops, trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1030   out:
2a2df321158817 Tom Zanussi              2013-10-24  1031        return ret;
2a2df321158817 Tom Zanussi              2013-10-24  1032   out_free:
c62ecf84dee35f Tom Zanussi              2021-11-05  1033        
event_trigger_reset_filter(cmd_ops, trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1034        
kfree(trigger_data);
2a2df321158817 Tom Zanussi              2013-10-24  1035        goto out;
2a2df321158817 Tom Zanussi              2013-10-24  1036  }
2a2df321158817 Tom Zanussi              2013-10-24  1037  

:::::: The code at line 1007 was first introduced by commit
:::::: 2a2df321158817811c5dc206dce808e0aa9f6d89 tracing: Add 'traceon' and 
'traceoff' event trigger commands

:::::: TO: Tom Zanussi <[email protected]>
:::::: CC: Steven Rostedt <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to