BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: Ammar Faizi CC: "GNU/Weeb Mailing List" TO: Daniel Bristot de Oliveira CC: "Steven Rostedt (Google)" tree: https://github.com/ammarfaizi2/linux-block rostedt/linux-trace/ftrace/core head: 9bdf000b894c0c5c7a07b904e138d732d09eaaa7 commit: 562c8396b67eb97ba6dbf1767fc1cf2d38f08156 [9/12] tracing/osnoise: Add OSNOISE_WORKLOAD option :::::: branch date: 15 hours ago :::::: commit date: 15 hours ago config: riscv-randconfig-m031-20221121 compiler: riscv64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter smatch warnings: kernel/trace/trace_osnoise.c:1936 s_options_show() error: testing array offset 'option' after use. vim +/option +1936 kernel/trace/trace_osnoise.c 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1916 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1917 static int s_options_show(struct seq_file *s, void *v) 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1918 { 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1919 loff_t *pos = v; 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1920 int option = *pos; 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1921 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1922 if (option == OSN_DEFAULTS) { 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1923 if (osnoise_options == OSN_DEFAULT_OPTIONS) 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1924 seq_printf(s, "%s", osnoise_options_str[option]); 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1925 else 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1926 seq_printf(s, "NO_%s", osnoise_options_str[option]); 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1927 goto out; 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1928 } 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1929 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1930 if (test_bit(option, &osnoise_options)) 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1931 seq_printf(s, "%s", osnoise_options_str[option]); 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1932 else 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1933 seq_printf(s, "NO_%s", osnoise_options_str[option]); 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1934 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1935 out: 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 @1936 if (option != OSN_MAX) 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1937 seq_puts(s, " "); 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1938 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1939 return 0; 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1940 } 14032a6e3878ad1 Daniel Bristot de Oliveira 2022-11-17 1941 :::::: The code at line 1936 was first introduced by commit :::::: 14032a6e3878ad1b05a51f9c08db8f5bc0d9c490 tracing/osnoise: Add osnoise/options file :::::: TO: Daniel Bristot de Oliveira :::::: CC: Steven Rostedt (Google) -- 0-DAY CI Kernel Test Service https://01.org/lkp