From: kernel test robot <lkp@intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [miquelraynal:macronix/nand-next/spi-nand-cont-read 13/13] drivers/mtd/nand/spi/macronix.c:71:12: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations
Date: Tue, 21 May 2024 04:01:26 +0800 [thread overview]
Message-ID: <202405210358.Lu8w6dPe-lkp@intel.com> (raw)
tree: https://github.com/miquelraynal/linux-0day.git macronix/nand-next/spi-nand-cont-read
head: f60b2d314a9c7534714521dfbeca9cff37134d56
commit: f60b2d314a9c7534714521dfbeca9cff37134d56 [13/13] mtd: spi-nand: macronix: Continuous read support
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240521/202405210358.Lu8w6dPe-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240521/202405210358.Lu8w6dPe-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405210358.Lu8w6dPe-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/mtd/nand/spi/macronix.c:10:
In file included from include/linux/mtd/spinand.h:16:
In file included from include/linux/spi/spi.h:17:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from drivers/mtd/nand/spi/macronix.c:10:
In file included from include/linux/mtd/spinand.h:16:
In file included from include/linux/spi/spi.h:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/mtd/nand/spi/macronix.c:10:
In file included from include/linux/mtd/spinand.h:16:
In file included from include/linux/spi/spi.h:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/mtd/nand/spi/macronix.c:10:
In file included from include/linux/mtd/spinand.h:16:
In file included from include/linux/spi/spi.h:17:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> drivers/mtd/nand/spi/macronix.c:71:12: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
71 | *eccsr = MACRONIX_ECCSR_BF_LAST_PAGE(*eccsr);
| ^
drivers/mtd/nand/spi/macronix.c:13:44: note: expanded from macro 'MACRONIX_ECCSR_BF_LAST_PAGE'
13 | #define MACRONIX_ECCSR_BF_LAST_PAGE(eccsr) FIELD_GET(GENMASK(3, 0), eccsr)
| ^
7 warnings and 1 error generated.
vim +/FIELD_GET +71 drivers/mtd/nand/spi/macronix.c
53
54 static int macronix_get_eccsr(struct spinand_device *spinand, u8 *eccsr)
55 {
56 struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(0x7c, 1),
57 SPI_MEM_OP_NO_ADDR,
58 SPI_MEM_OP_DUMMY(1, 1),
59 SPI_MEM_OP_DATA_IN(1, eccsr, 1));
60
61 int ret = spi_mem_exec_op(spinand->spimem, &op);
62 if (ret)
63 return ret;
64
65 /*
66 * ECCSR exposes the number of bitflips for the last read page in bits [3:0].
67 * Continuous read compatible chips also expose maximum number of
68 * bitflips for the whole read operation in bits [7:4].
69 */
70 if (!spinand->set_cont_read)
> 71 *eccsr = MACRONIX_ECCSR_BF_LAST_PAGE(*eccsr);
72 else
73 *eccsr = MACRONIX_ECCSR_BF_ACCUMULATED_PAGES(*eccsr);
74
75 return 0;
76 }
77
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-20 20:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202405210358.Lu8w6dPe-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=miquel.raynal@bootlin.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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