lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 5 Nov 2023 12:29:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christoph Hellwig <hch@....de>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: kernel/dma/contiguous.c:45:26: warning: 'size_bytes' defined but not
 used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   aea6bf908d730b01bd264a8821159db9463c111c
commit: cf65a0f6f6ff7631ba0ac0513a14ca5b65320d80 dma-mapping: move all DMA mapping code to kernel/dma
date:   5 years ago
config: x86_64-buildonly-randconfig-r006-20211211 (https://download.01.org/0day-ci/archive/20231105/202311051203.BxWQ2ZeM-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231105/202311051203.BxWQ2ZeM-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311051203.BxWQ2ZeM-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/dma/contiguous.c:45:26: warning: 'size_bytes' defined but not used [-Wunused-const-variable=]
      45 | static const phys_addr_t size_bytes = (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
         |                          ^~~~~~~~~~


vim +/size_bytes +45 kernel/dma/contiguous.c

a254129e8686bf drivers/base/dma-contiguous.c Joonsoo Kim        2014-08-06  34  
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  35  /*
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  36   * Default global CMA area size can be defined in kernel's .config.
73678804f4e525 drivers/base/dma-contiguous.c Michael Opdenacker 2013-09-18  37   * This is useful mainly for distro maintainers to create a kernel
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  38   * that works correctly for most supported systems.
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  39   * The size can be set in bytes or as a percentage of the total memory
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  40   * in the system.
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  41   *
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  42   * Users, who want to set the size of global CMA area for their system
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  43   * should use cma= kernel parameter.
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  44   */
a785ce9c90bc7d drivers/base/dma-contiguous.c Tan Xiaojun        2015-09-24 @45  static const phys_addr_t size_bytes = (phys_addr_t)CMA_SIZE_MBYTES * SZ_1M;
4009793e15d444 drivers/base/dma-contiguous.c Vitaly Andrianov   2012-12-05  46  static phys_addr_t size_cmdline = -1;
5ea3b1b2f8ad91 drivers/base/dma-contiguous.c Akinobu Mita       2014-06-04  47  static phys_addr_t base_cmdline;
5ea3b1b2f8ad91 drivers/base/dma-contiguous.c Akinobu Mita       2014-06-04  48  static phys_addr_t limit_cmdline;
c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski   2011-12-29  49  

:::::: The code at line 45 was first introduced by commit
:::::: a785ce9c90bc7d73b5cae4388641b310948509cb CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit

:::::: TO: Tan Xiaojun <tanxiaojun@...wei.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

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

Powered by blists - more mailing lists