public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: James Morse <james.morse@arm.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [morse:mpam/snapshot/v5.18 128/146] drivers/platform/mpam/mpam_resctrl.c:309:25: warning: variable 'dom' is uninitialized when used here
Date: Mon, 20 Jun 2022 05:59:57 +0800	[thread overview]
Message-ID: <202206200512.vutoaRFq-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.18
head:   bac90d25cbdee0fc233b9b1c47d5b6f44101a384
commit: db8847e121228898d170f140698fb01359cff997 [128/146] arm_mpam: resctrl: Add resctrl_arch_rmid_read() and resctrl_arch_reset_rmid()
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220620/202206200512.vutoaRFq-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?id=db8847e121228898d170f140698fb01359cff997
        git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
        git fetch --no-tags morse mpam/snapshot/v5.18
        git checkout db8847e121228898d170f140698fb01359cff997
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/perf/ drivers/platform/mpam/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/platform/mpam/mpam_resctrl.c:309:25: warning: variable 'dom' is uninitialized when used here [-Wuninitialized]
                   mpam_msmon_reset_mbwu(dom->comp, &cfg);
                                         ^~~
   drivers/platform/mpam/mpam_resctrl.c:298:30: note: initialize the variable 'dom' to silence this warning
           struct mpam_resctrl_dom *dom;
                                       ^
                                        = NULL
   1 warning generated.


vim +/dom +309 drivers/platform/mpam/mpam_resctrl.c

   293	
   294	void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_domain *d,
   295				     u32 closid, u32 rmid, enum resctrl_event_id eventid)
   296	{
   297		struct mon_cfg cfg;
   298		struct mpam_resctrl_dom *dom;
   299	
   300		if (eventid != QOS_L3_MBM_LOCAL_EVENT_ID)
   301			return;
   302	
   303		cfg.mon = resctrl_arch_rmid_idx_encode(closid, rmid);
   304		cfg.match_pmg = true;
   305		cfg.pmg = rmid;
   306	
   307		if (cdp_enabled) {
   308			cfg.partid = closid << 1;
 > 309			mpam_msmon_reset_mbwu(dom->comp, &cfg);
   310	
   311			cfg.partid += 1;
   312			mpam_msmon_reset_mbwu(dom->comp, &cfg);
   313		} else {
   314			cfg.partid = closid;
   315			mpam_msmon_reset_mbwu(dom->comp, &cfg);
   316		}
   317	}
   318	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-06-19 22:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206200512.vutoaRFq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=james.morse@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox