[openeuler:openEuler-1.0-LTS 1890/1890] arch/x86/events/zhaoxin/uncore.c:2789:36-50: opportunity for str_enabled_disabled(uncore_enabled)
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3749a0fa9e1453451f807b1ca86250ed77c17f05 commit: 80e508024be6ebad4efb6e9c0f2cc273e6ce3ce2 [1890/1890] perf/zhaoxin/uncore: Enhance uncore support and fix related bugs config: x86_64-randconfig-r062-20251028 (https://download.01.org/0day-ci/archive/20251029/202510290723.7bXIAhsR-lkp@i...) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202510290723.7bXIAhsR-lkp@intel.com/ cocci warnings: (new ones prefixed by >>)
arch/x86/events/zhaoxin/uncore.c:2789:36-50: opportunity for str_enabled_disabled(uncore_enabled)
vim +2789 arch/x86/events/zhaoxin/uncore.c 2775 2776 /* 2777 * Process kernel command-line parameter at boot time. 2778 * zhaoxin_pmc_uncore={0|off} or zhaoxin_pmc_uncore={1|on} 2779 */ 2780 static int __init zhaoxin_uncore_enable(char *str) 2781 { 2782 if (!strcasecmp(str, "off") || !strcmp(str, "0")) 2783 uncore_enabled = 0; 2784 else if (!strcasecmp(str, "on") || !strcmp(str, "1")) 2785 uncore_enabled = 1; 2786 else 2787 pr_err("zhaoxin_pmc_uncore: invalid parameter value (%s)\n", str); 2788
2789 pr_info("Zhaoxin PMC uncore %s\n", uncore_enabled ? "enabled" : "disabled"); 2790 2791 return 1; 2792 } 2793 __setup("zhaoxin_pmc_uncore=", zhaoxin_uncore_enable); 2794
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot