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  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:   Thu, 22 Jul 2021 10:37:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Daniel Palmer <daniel@...f.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [linux-chenxing:mstar_v5_14_rebase 214/352]
 arch/arm/mach-mstar/pm.c:116:11: warning: assignment to 'void *' from 'long
 unsigned int' makes pointer from integer without a cast

tree:   git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head:   651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 91aa393cc0c2ecb91050bf89c81540d3127b4804 [214/352] pm code
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
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
        # https://github.com/linux-chenxing/linux/commit/91aa393cc0c2ecb91050bf89c81540d3127b4804
        git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
        git fetch --no-tags linux-chenxing mstar_v5_14_rebase
        git checkout 91aa393cc0c2ecb91050bf89c81540d3127b4804
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   arch/arm/mach-mstar/pm.c:81:12: warning: no previous prototype for 'msc313_pm_init' [-Wmissing-prototypes]
      81 | int __init msc313_pm_init(void)
         |            ^~~~~~~~~~~~~~
   arch/arm/mach-mstar/pm.c: In function 'msc313_pm_init':
>> arch/arm/mach-mstar/pm.c:116:11: warning: assignment to 'void *' from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion]
     116 |  imi_base = gen_pool_alloc(imi_pool, MSTARV7_PM_SIZE);
         |           ^
>> arch/arm/mach-mstar/pm.c:123:41: warning: passing argument 2 of 'gen_pool_virt_to_phys' makes integer from pointer without a cast [-Wint-conversion]
     123 |  phys = gen_pool_virt_to_phys(imi_pool, imi_base);
         |                                         ^~~~~~~~
         |                                         |
         |                                         void *
   In file included from arch/arm/mach-mstar/pm.c:11:
   include/linux/genalloc.h:97:65: note: expected 'long unsigned int' but argument is of type 'void *'
      97 | extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
         |                                                                 ^~~~~~~~~~~~~


vim +116 arch/arm/mach-mstar/pm.c

c1569e4f0b838c Daniel Palmer 2019-08-30   80  
c1569e4f0b838c Daniel Palmer 2019-08-30   81  int __init msc313_pm_init(void)
c1569e4f0b838c Daniel Palmer 2019-08-30   82  {
c1569e4f0b838c Daniel Palmer 2019-08-30   83  	int ret = 0;
c1569e4f0b838c Daniel Palmer 2019-08-30   84  	struct device_node *node;
c1569e4f0b838c Daniel Palmer 2019-08-30   85  	struct platform_device *pdev;
c1569e4f0b838c Daniel Palmer 2019-08-30   86  	struct gen_pool *imi_pool;
c1569e4f0b838c Daniel Palmer 2019-08-30   87  	void __iomem *imi_base;
c1569e4f0b838c Daniel Palmer 2019-08-30   88  	void __iomem *virt;
c1569e4f0b838c Daniel Palmer 2019-08-30   89  	phys_addr_t phys;
c1569e4f0b838c Daniel Palmer 2019-08-30   90  	unsigned int resume_pbase;
c1569e4f0b838c Daniel Palmer 2019-08-30   91  
c1569e4f0b838c Daniel Palmer 2019-08-30   92  	pmsleep = syscon_regmap_lookup_by_compatible(COMPAT_PMSLEEP);
c1569e4f0b838c Daniel Palmer 2019-08-30   93  	if(!pmsleep)
c1569e4f0b838c Daniel Palmer 2019-08-30   94  		return -ENODEV;
c1569e4f0b838c Daniel Palmer 2019-08-30   95  
c1569e4f0b838c Daniel Palmer 2019-08-30   96  	node = of_find_compatible_node(NULL, NULL, "mmio-sram");
c1569e4f0b838c Daniel Palmer 2019-08-30   97  	if (!node) {
c1569e4f0b838c Daniel Palmer 2019-08-30   98  		pr_warn("%s: failed to find imi node\n", __func__);
c1569e4f0b838c Daniel Palmer 2019-08-30   99  		return -ENODEV;
c1569e4f0b838c Daniel Palmer 2019-08-30  100  	}
c1569e4f0b838c Daniel Palmer 2019-08-30  101  
91aa393cc0c2ec Daniel Palmer 2020-11-24  102  	pdev = of_find_device_by_node(node);
c1569e4f0b838c Daniel Palmer 2019-08-30  103  	if (!pdev) {
c1569e4f0b838c Daniel Palmer 2019-08-30  104  		pr_warn("%s: failed to find imi device\n", __func__);
c1569e4f0b838c Daniel Palmer 2019-08-30  105  		ret = -ENODEV;
c1569e4f0b838c Daniel Palmer 2019-08-30  106  		goto put_node;
c1569e4f0b838c Daniel Palmer 2019-08-30  107  	}
c1569e4f0b838c Daniel Palmer 2019-08-30  108  
c1569e4f0b838c Daniel Palmer 2019-08-30  109  	imi_pool = gen_pool_get(&pdev->dev, NULL);
c1569e4f0b838c Daniel Palmer 2019-08-30  110  	if (!imi_pool) {
c1569e4f0b838c Daniel Palmer 2019-08-30  111  		pr_warn("%s: imi pool unavailable!\n", __func__);
c1569e4f0b838c Daniel Palmer 2019-08-30  112  		ret = -ENODEV;
c1569e4f0b838c Daniel Palmer 2019-08-30  113  		goto put_node;
c1569e4f0b838c Daniel Palmer 2019-08-30  114  	}
c1569e4f0b838c Daniel Palmer 2019-08-30  115  
c1569e4f0b838c Daniel Palmer 2019-08-30 @116  	imi_base = gen_pool_alloc(imi_pool, MSTARV7_PM_SIZE);
c1569e4f0b838c Daniel Palmer 2019-08-30  117  	if (!imi_base) {
c1569e4f0b838c Daniel Palmer 2019-08-30  118  		pr_warn("%s: unable to alloc pm memory in imi!\n", __func__);
c1569e4f0b838c Daniel Palmer 2019-08-30  119  		ret = -ENOMEM;
c1569e4f0b838c Daniel Palmer 2019-08-30  120  		goto put_node;
91aa393cc0c2ec Daniel Palmer 2020-11-24  121  	}
c1569e4f0b838c Daniel Palmer 2019-08-30  122  
91aa393cc0c2ec Daniel Palmer 2020-11-24 @123  	phys = gen_pool_virt_to_phys(imi_pool, imi_base);

:::::: The code at line 116 was first introduced by commit
:::::: c1569e4f0b838c4a36a86a3ba7695da03b107ba2 ARM: mstar: PM

:::::: TO: Daniel Palmer <daniel@...f.com>
:::::: CC: Daniel Palmer <daniel@...f.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (78808 bytes)

Powered by blists - more mailing lists