oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yinbo Zhu <zhuyinbo@loongson.cn>, Mark Brown <broonie@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Jianmin Lv <lvjianmin@loongson.cn>,
	wanghongliang@loongson.cn, Liu Peibao <liupeibao@loongson.cn>,
	loongson-kernel@lists.loongnix.cn,
	Yinbo Zhu <zhuyinbo@loongson.cn>
Subject: Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
Date: Fri, 24 Mar 2023 18:15:02 +0800	[thread overview]
Message-ID: <202303241811.OXj9KxAr-lkp@intel.com> (raw)
In-Reply-To: <20230324063317.14664-3-zhuyinbo@loongson.cn>

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@intel.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

       reply	other threads:[~2023-03-24 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230324063317.14664-3-zhuyinbo@loongson.cn>
2023-03-24 10:15 ` kernel test robot [this message]
2023-03-27  8:24   ` [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller zhuyinbo
2023-03-24 21:53 ` kernel test robot
2023-03-27  7:47   ` zhuyinbo

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=202303241811.OXj9KxAr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).