[ambarus:spi-nor/next-sst26-locking 21/21] drivers/mtd/spi-nor/sst.c:39: warning: expecting prototype for spi_nor_sst_rbpr(). Prototype was for spi_nor_sst26_rbpr() instead

0 views
Skip to first unread message

kernel test robot

unread,
Apr 15, 2021, 10:33:44 AM4/15/21
to Tudor Ambarus, kbuil...@lists.01.org, clang-bu...@googlegroups.com
tree: https://github.com/ambarus/linux-0day spi-nor/next-sst26-locking
head: 4953dd5ca5cc7613b46aec1b26713518994f7aa1
commit: 4953dd5ca5cc7613b46aec1b26713518994f7aa1 [21/21] mtd: spi-nor: sst: Add Individual Block Locking support
config: x86_64-randconfig-a014-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/ambarus/linux-0day/commit/4953dd5ca5cc7613b46aec1b26713518994f7aa1
git remote add ambarus https://github.com/ambarus/linux-0day
git fetch --no-tags ambarus spi-nor/next-sst26-locking
git checkout 4953dd5ca5cc7613b46aec1b26713518994f7aa1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64

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

All warnings (new ones prefixed by >>):

>> drivers/mtd/spi-nor/sst.c:39: warning: expecting prototype for spi_nor_sst_rbpr(). Prototype was for spi_nor_sst26_rbpr() instead


vim +39 drivers/mtd/spi-nor/sst.c

17
18 /*
19 * SST26 Memory Organization:
20 * 4 * 8 KByte blocks (read and write protection bits)
21 * 1 * 32 KByte block (write protection bits)
22 * (mtd->size / SZ_64K - 2) * 64Kbyte blocks (write protection bits)
23 * 1 * 32 KByte block (write protection bits)
24 * 4 * 8 KByte blocks (read and write protection bits)
25 */
26 #define spi_nor_sst26_bpr_len(n_sectors) \
27 ((((n_sectors) - 2 + 2 + 2 * (4 + 4)) + BITS_PER_BYTE - 1) / BITS_PER_BYTE)
28
29 /**
30 * spi_nor_sst_rbpr() - Read Block-Protection Register on SPI NOR SST26 family.
31 * @nor: pointer to 'struct spi_nor'.
32 * @bpr: pointer to DMA-able buffer where the value of the
33 * Block-Protection Register will be written.
34 * @len: number of bytes to write to the Block-Protection Register.
35 *
36 * Return: 0 on success, -errno otherwise.
37 */
38 static int spi_nor_sst26_rbpr(struct spi_nor *nor, u8 *bpr, size_t len)
> 39 {
40 int ret;
41
42 if (nor->spimem) {
43 struct spi_mem_op op =
44 SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_SST26_RBPR, 0),
45 SPI_MEM_OP_NO_ADDR,
46 SPI_MEM_OP_NO_DUMMY,
47 SPI_MEM_OP_DATA_IN(len, bpr, 0));
48
49 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto);
50
51 ret = spi_mem_exec_op(nor->spimem, &op);
52 } else {
53 ret = spi_nor_controller_ops_read_reg(nor, SPINOR_OP_SST26_RBPR,
54 bpr, len);
55 }
56
57 if (ret)
58 dev_dbg(nor->dev, "error %d reading SST26 BPR\n", ret);
59
60 return ret;
61 }
62

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org
.config.gz
Reply all
Reply to author
Forward
0 new messages