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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202303241811.OXj9KxAr-lkp@intel.com>
Date:   Fri, 24 Mar 2023 18:15:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yinbo Zhu <zhuyinbo@...ngson.cn>, Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, Jianmin Lv <lvjianmin@...ngson.cn>,
        wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
        loongson-kernel@...ts.loongnix.cn, Yinbo Zhu <zhuyinbo@...ngson.cn>
Subject: Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson
 spi controller

Hi Yinbo,

I love your patch! Yet something to improve:

[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on robh/for-next krzk-dt/for-next linus/master v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link:    https://lore.kernel.org/r/20230324063317.14664-3-zhuyinbo%40loongson.cn
patch subject: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230324/202303241811.OXj9KxAr-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3742622c455d25c4a110d2caf2f5b2ceefe88f91
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
        git checkout 3742622c455d25c4a110d2caf2f5b2ceefe88f91
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303241811.OXj9KxAr-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/spi/spi-loongson-core.c: In function 'loongson_spi_init_master':
>> drivers/spi/spi-loongson-core.c:229:21: error: implicit declaration of function 'devm_ioremap'; did you mean 'of_ioremap'? [-Werror=implicit-function-declaration]
     229 |         spi->base = devm_ioremap(dev, res->start, resource_size(res));
         |                     ^~~~~~~~~~~~
         |                     of_ioremap
>> drivers/spi/spi-loongson-core.c:229:19: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     229 |         spi->base = devm_ioremap(dev, res->start, resource_size(res));
         |                   ^
   cc1: some warnings being treated as errors


vim +229 drivers/spi/spi-loongson-core.c

   201	
   202	int loongson_spi_init_master(struct device *dev, struct resource *res)
   203	{
   204		struct spi_master *master;
   205		struct loongson_spi *spi;
   206		struct clk *clk;
   207		int ret;
   208	
   209		master = spi_alloc_master(dev, sizeof(struct loongson_spi));
   210		if (master == NULL) {
   211			dev_dbg(dev, "master allocation failed\n");
   212			return -ENOMEM;
   213		}
   214	
   215		master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
   216		master->setup = loongson_spi_setup;
   217		master->prepare_message = loongson_spi_prepare_message;
   218		master->transfer_one = loongson_spi_transfer_one;
   219		master->unprepare_message = loongson_spi_unprepare_message;
   220		master->set_cs = loongson_spi_set_cs;
   221		master->num_chipselect = 4;
   222		master->dev.of_node = of_node_get(dev->of_node);
   223		dev_set_drvdata(dev, master);
   224	
   225		spi = spi_master_get_devdata(master);
   226	
   227		spi->master = master;
   228	
 > 229		spi->base = devm_ioremap(dev, res->start, resource_size(res));
   230		if (spi->base == NULL) {
   231			dev_err(dev, "cannot map io\n");
   232			ret = -ENXIO;
   233			goto free_master;
   234		}
   235	
   236		clk = devm_clk_get(dev, NULL);
   237		if (!IS_ERR(clk))
   238			spi->clk_rate = clk_get_rate(clk);
   239	
   240		loongson_spi_reginit(spi);
   241	
   242		spi->mode = 0;
   243		if (of_get_property(dev->of_node, "spi-nocs", NULL))
   244			spi->mode |= SPI_NO_CS;
   245	
   246		ret = spi_register_master(master);
   247		if (ret < 0)
   248			goto free_master;
   249	
   250		return ret;
   251	
   252	free_master:
   253		kfree(master);
   254		spi_master_put(master);
   255	
   256		return ret;
   257	}
   258	EXPORT_SYMBOL_GPL(loongson_spi_init_master);
   259	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ