linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Ho-Ren (Jack) Chuang" <horenchuang@bytedance.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	Hao Xiang <hao.xiang@bytedance.com>,
	 "Huang, Ying" <ying.huang@intel.com>
Subject: Re: [External] [akpm-mm:mm-unstable 263/270] mm/memory-tiers.c:769:13: warning: variable 'rc' set but not used
Date: Mon, 1 Apr 2024 16:22:47 -0700	[thread overview]
Message-ID: <CAKPbEqq93G8wrijC+hTFRaYpiBNWLy540rTusqY9etDQmuuQLQ@mail.gmail.com> (raw)
In-Reply-To: <202403311826.SNOu8jAt-lkp@intel.com>

Will fix it in V10. Thanks,

On Sun, Mar 31, 2024 at 3:23 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   0cef2c0a2a356137b170c3cb46cb9c1dd2ca3e6b
> commit: fbc8b54896eef0b4d9aaa793523867c7eb86e788 [263/270] memory tier: create CPUless memory tiers after obtaining HMAT info
> config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240331/202403311826.SNOu8jAt-lkp@intel.com/config)
> compiler: gcc-11 (Ubuntu 11.4.0-4ubuntu1) 11.4.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240331/202403311826.SNOu8jAt-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/202403311826.SNOu8jAt-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>    mm/memory-tiers.c: In function 'mt_perf_to_adistance':
> >> mm/memory-tiers.c:769:13: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
>      769 |         int rc = 0;
>          |             ^~
>
>
> vim +/rc +769 mm/memory-tiers.c
>
>    766
>    767  int mt_perf_to_adistance(struct access_coordinate *perf, int *adist)
>    768  {
>  > 769          int rc = 0;
>    770
>    771          mutex_lock(&default_dram_perf_lock);
>    772          if (default_dram_perf_error) {
>    773                  rc = -EIO;
>    774                  goto out;
>    775          }
>    776
>    777          if (perf->read_latency + perf->write_latency == 0 ||
>    778              perf->read_bandwidth + perf->write_bandwidth == 0) {
>    779                  rc = -EINVAL;
>    780                  goto out;
>    781          }
>    782
>    783          if (default_dram_perf_ref_nid == NUMA_NO_NODE) {
>    784                  rc = -ENOENT;
>    785                  goto out;
>    786          }
>    787          /*
>    788           * The abstract distance of a memory node is in direct proportion to
>    789           * its memory latency (read + write) and inversely proportional to its
>    790           * memory bandwidth (read + write).  The abstract distance, memory
>    791           * latency, and memory bandwidth of the default DRAM nodes are used as
>    792           * the base.
>    793           */
>    794          *adist = MEMTIER_ADISTANCE_DRAM *
>    795                  (perf->read_latency + perf->write_latency) /
>    796                  (default_dram_perf.read_latency + default_dram_perf.write_latency) *
>    797                  (default_dram_perf.read_bandwidth + default_dram_perf.write_bandwidth) /
>    798                  (perf->read_bandwidth + perf->write_bandwidth);
>    799
>    800  out:
>    801          mutex_unlock(&default_dram_perf_lock);
>    802          return 0;
>    803  }
>    804  EXPORT_SYMBOL_GPL(mt_perf_to_adistance);
>    805
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki



-- 
Best regards,
Ho-Ren (Jack) Chuang
莊賀任


      reply	other threads:[~2024-04-01 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-31 10:23 kernel test robot
2024-04-01 23:22 ` Ho-Ren (Jack) Chuang [this message]

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=CAKPbEqq93G8wrijC+hTFRaYpiBNWLy540rTusqY9etDQmuuQLQ@mail.gmail.com \
    --to=horenchuang@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=hao.xiang@bytedance.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ying.huang@intel.com \
    /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