Re: [External] [akpm-mm:mm-unstable 263/270] mm/memory-tiers.c:769:13: warning: variable 'rc' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Will fix it in V10. Thanks,

On Sun, Mar 31, 2024 at 3:23 AM kernel test robot <lkp@xxxxxxxxx> 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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202403311826.SNOu8jAt-lkp@xxxxxxxxx/
>
> 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
莊賀任





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux