[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202009292054.cChoIYZQ-lkp@intel.com>
Date: Tue, 29 Sep 2020 21:00:56 +0800
From: kernel test robot <lkp@...el.com>
To: Yifeng Zhao <yifeng.zhao@...k-chips.com>,
miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
robh+dt@...nel.org
Cc: kbuild-all@...ts.01.org, devicetree@...r.kernel.org,
linux-mtd@...ts.infradead.org, heiko@...ech.de,
linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 2/8] mtd: rawnand: rockchip: NFC drivers for RK3308,
RK2928 and others
Hi Yifeng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rockchip/for-next]
[also build test ERROR on robh/for-next linus/master v5.9-rc7 next-20200929]
[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]
url: https://github.com/0day-ci/linux/commits/Yifeng-Zhao/Add-Rockchip-NFC-drivers-for-RK3308-and-others/20200929-171735
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.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/0day-ci/linux/commit/1c9d56b98766d73850def484b00e25b6270429c0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yifeng-Zhao/Add-Rockchip-NFC-drivers-for-RK3308-and-others/20200929-171735
git checkout 1c9d56b98766d73850def484b00e25b6270429c0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:378:25: warning: 'struct nand_data_interface' declared inside parameter list will not be visible outside of this definition or declaration
378 | const struct nand_data_interface *conf)
| ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/rockchip-nand-controller.c: In function 'rk_nfc_setup_data_interface':
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:388:33: error: passing argument 1 of 'nand_get_sdr_timings' from incompatible pointer type [-Werror=incompatible-pointer-types]
388 | timings = nand_get_sdr_timings(conf);
| ^~~~
| |
| const struct nand_data_interface *
In file included from drivers/mtd/nand/raw/rockchip-nand-controller.c:16:
include/linux/mtd/rawnand.h:524:58: note: expected 'const struct nand_interface_config *' but argument is of type 'const struct nand_data_interface *'
524 | nand_get_sdr_timings(const struct nand_interface_config *conf)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/mtd/nand/raw/rockchip-nand-controller.c: In function 'rk_nfc_attach_chip':
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1008:15: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
1008 | temp_buf = kzalloc(len, GFP_KERNEL | GFP_DMA);
| ^~~~~~~
| vzalloc
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1008:13: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
1008 | temp_buf = kzalloc(len, GFP_KERNEL | GFP_DMA);
| ^
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1011:4: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
1011 | kfree(nfc->buffer);
| ^~~~~
| vfree
drivers/mtd/nand/raw/rockchip-nand-controller.c:1016:13: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
1016 | temp_buf = kzalloc(oob_len, GFP_KERNEL | GFP_DMA);
| ^
drivers/mtd/nand/raw/rockchip-nand-controller.c:1025:14: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
1025 | nfc->buffer = kzalloc(len, GFP_KERNEL | GFP_DMA);
| ^
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1030:15: warning: assignment to 'u32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
1030 | nfc->oob_buf = kzalloc(oob_len, GFP_KERNEL | GFP_DMA);
| ^
drivers/mtd/nand/raw/rockchip-nand-controller.c: At top level:
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1057:3: error: 'const struct nand_controller_ops' has no member named 'setup_data_interface'; did you mean 'setup_interface'?
1057 | .setup_data_interface = rk_nfc_setup_data_interface,
| ^~~~~~~~~~~~~~~~~~~~
| setup_interface
>> drivers/mtd/nand/raw/rockchip-nand-controller.c:1057:26: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
1057 | .setup_data_interface = rk_nfc_setup_data_interface,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/rockchip-nand-controller.c:1057:26: note: (near initialization for 'rk_nfc_controller_ops')
drivers/mtd/nand/raw/rockchip-nand-controller.c:1057:26: error: initialization of 'void (*)(struct nand_chip *)' from incompatible pointer type 'int (*)(struct nand_chip *, int, const struct nand_data_interface *)' [-Werror=incompatible-pointer-types]
drivers/mtd/nand/raw/rockchip-nand-controller.c:1057:26: note: (near initialization for 'rk_nfc_controller_ops.detach_chip')
cc1: some warnings being treated as errors
vim +/nand_get_sdr_timings +388 drivers/mtd/nand/raw/rockchip-nand-controller.c
376
377 static int rk_nfc_setup_data_interface(struct nand_chip *chip, int csline,
> 378 const struct nand_data_interface *conf)
379 {
380 struct rk_nfc *nfc = nand_get_controller_data(chip);
381 const struct nand_sdr_timings *timings;
382 u32 rate, tc2rw, trwpw, trw2c;
383 u32 temp;
384
385 if (csline == NAND_DATA_IFACE_CHECK_ONLY)
386 return 0;
387
> 388 timings = nand_get_sdr_timings(conf);
389 if (IS_ERR(timings))
390 return -EOPNOTSUPP;
391
392 if (IS_ERR(nfc->nfc_clk))
393 rate = clk_get_rate(nfc->ahb_clk);
394 else
395 rate = clk_get_rate(nfc->nfc_clk);
396
397 /* Turn clock rate into kHz. */
398 rate /= 1000;
399
400 tc2rw = 1;
401 trw2c = 1;
402
403 trwpw = max(timings->tWC_min, timings->tRC_min) / 1000;
404 trwpw = DIV_ROUND_UP(trwpw * rate, 1000000);
405
406 temp = timings->tREA_max / 1000;
407 temp = DIV_ROUND_UP(temp * rate, 1000000);
408
409 if (trwpw < temp)
410 trwpw = temp;
411
412 /*
413 * ACCON: access timing control register
414 * -------------------------------------
415 * 31:18: reserved
416 * 17:12: csrw, clock cycles from the falling edge of CSn to the
417 * falling edge of RDn or WRn
418 * 11:11: reserved
419 * 10:05: rwpw, the width of RDn or WRn in processor clock cycles
420 * 04:00: rwcs, clock cycles from the rising edge of RDn or WRn to the
421 * rising edge of CSn
422 */
423 temp = ACCTIMING(tc2rw, trwpw, trw2c);
424 writel(temp, nfc->regs + NFC_FMWAIT);
425
426 return 0;
427 }
428
---
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" (74192 bytes)
Powered by blists - more mailing lists