llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [morse:mpam/snapshot/v6.17-rc2 77/89] drivers/resctrl/mpam_resctrl.c:1051:3: warning: variable 'dom' is uninitialized when used here
@ 2025-08-24 11:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-24 11:39 UTC (permalink / raw)
  To: James Morse; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v6.17-rc2
head:   c0646bf01fb5098c7d6cbc44af567a8bb2ca82d6
commit: eab6c1ea362813e5921cd435519d6ee54c4b7aec [77/89] arm_mpam: resctrl: Call resctrl_exit() in the event of errors
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250824/202508241909.RzqGMepa-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250824/202508241909.RzqGMepa-lkp@intel.com/reproduce)

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/202508241909.RzqGMepa-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/resctrl/mpam_resctrl.c:400:27: warning: variable 'l3' set but not used [-Wunused-but-set-variable]
     400 |         struct mpam_resctrl_res *l3;
         |                                  ^
   drivers/resctrl/mpam_resctrl.c:469:27: warning: variable 'l3' set but not used [-Wunused-but-set-variable]
     469 |         struct mpam_resctrl_res *l3;
         |                                  ^
>> drivers/resctrl/mpam_resctrl.c:1051:3: warning: variable 'dom' is uninitialized when used here [-Wuninitialized]
    1051 |                 dom->mbm_local_evt_cfg = 0;
         |                 ^~~
   drivers/resctrl/mpam_resctrl.c:1045:30: note: initialize the variable 'dom' to silence this warning
    1045 |         struct mpam_resctrl_dom *dom;
         |                                     ^
         |                                      = NULL
   3 warnings generated.


vim +/dom +1051 drivers/resctrl/mpam_resctrl.c

  1042	
  1043	void resctrl_arch_mon_event_config_write(void *info)
  1044	{
  1045		struct mpam_resctrl_dom *dom;
  1046		struct resctrl_mon_config_info *mon_info = info;
  1047	
  1048		WARN_ON_ONCE(mon_info->mon_config & ~MPAM_RESTRL_EVT_CONFIG_VALID);
  1049	
  1050		if (!mpam_is_enabled()) {
> 1051			dom->mbm_local_evt_cfg = 0;
  1052			return;
  1053		}
  1054	
  1055		dom = container_of(mon_info->d, struct mpam_resctrl_dom, resctrl_mon_dom);
  1056		dom->mbm_local_evt_cfg = mon_info->mon_config & MPAM_RESTRL_EVT_CONFIG_VALID;
  1057	}
  1058	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-24 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-24 11:39 [morse:mpam/snapshot/v6.17-rc2 77/89] drivers/resctrl/mpam_resctrl.c:1051:3: warning: variable 'dom' is uninitialized when used here kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).