Hi Marek, I love your patch! Yet something to improve: [auto build test ERROR on net/master] [also build test ERROR on v5.2-rc6 next-20190621] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Marek-Vasut/net-dsa-microchip-Convert-to-regmap/20190625-021215 config: x86_64-randconfig-ne0-06250702 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read': >> drivers/base/regmap/regmap-spi.c:98: undefined reference to `spi_write_then_read' ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_async_write': >> drivers/base/regmap/regmap-spi.c:77: undefined reference to `spi_async' ld: drivers/base/regmap/regmap-spi.o: in function `spi_sync_transfer': include/linux/spi/spi.h:1087: undefined reference to `spi_sync' ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_gather_write': >> drivers/base/regmap/regmap-spi.c:50: undefined reference to `spi_sync' vim +98 drivers/base/regmap/regmap-spi.c a676f083 Mark Brown 2011-05-12 35 0135bbcc Stephen Warren 2012-04-04 36 static int regmap_spi_gather_write(void *context, a676f083 Mark Brown 2011-05-12 37 const void *reg, size_t reg_len, a676f083 Mark Brown 2011-05-12 38 const void *val, size_t val_len) a676f083 Mark Brown 2011-05-12 39 { 0135bbcc Stephen Warren 2012-04-04 40 struct device *dev = context; a676f083 Mark Brown 2011-05-12 41 struct spi_device *spi = to_spi_device(dev); a676f083 Mark Brown 2011-05-12 42 struct spi_message m; a676f083 Mark Brown 2011-05-12 43 struct spi_transfer t[2] = { { .tx_buf = reg, .len = reg_len, }, a676f083 Mark Brown 2011-05-12 44 { .tx_buf = val, .len = val_len, }, }; a676f083 Mark Brown 2011-05-12 45 a676f083 Mark Brown 2011-05-12 46 spi_message_init(&m); a676f083 Mark Brown 2011-05-12 47 spi_message_add_tail(&t[0], &m); a676f083 Mark Brown 2011-05-12 48 spi_message_add_tail(&t[1], &m); a676f083 Mark Brown 2011-05-12 49 a676f083 Mark Brown 2011-05-12 @50 return spi_sync(spi, &m); a676f083 Mark Brown 2011-05-12 51 } a676f083 Mark Brown 2011-05-12 52 e0356dfe Mark Brown 2013-01-29 53 static int regmap_spi_async_write(void *context, e0356dfe Mark Brown 2013-01-29 54 const void *reg, size_t reg_len, e0356dfe Mark Brown 2013-01-29 55 const void *val, size_t val_len, e0356dfe Mark Brown 2013-01-29 56 struct regmap_async *a) e0356dfe Mark Brown 2013-01-29 57 { e0356dfe Mark Brown 2013-01-29 58 struct regmap_async_spi *async = container_of(a, e0356dfe Mark Brown 2013-01-29 59 struct regmap_async_spi, e0356dfe Mark Brown 2013-01-29 60 core); e0356dfe Mark Brown 2013-01-29 61 struct device *dev = context; e0356dfe Mark Brown 2013-01-29 62 struct spi_device *spi = to_spi_device(dev); e0356dfe Mark Brown 2013-01-29 63 e0356dfe Mark Brown 2013-01-29 64 async->t[0].tx_buf = reg; e0356dfe Mark Brown 2013-01-29 65 async->t[0].len = reg_len; e0356dfe Mark Brown 2013-01-29 66 async->t[1].tx_buf = val; e0356dfe Mark Brown 2013-01-29 67 async->t[1].len = val_len; e0356dfe Mark Brown 2013-01-29 68 e0356dfe Mark Brown 2013-01-29 69 spi_message_init(&async->m); e0356dfe Mark Brown 2013-01-29 70 spi_message_add_tail(&async->t[0], &async->m); cd1b9dd0 Mark Brown 2013-10-10 71 if (val) e0356dfe Mark Brown 2013-01-29 72 spi_message_add_tail(&async->t[1], &async->m); e0356dfe Mark Brown 2013-01-29 73 e0356dfe Mark Brown 2013-01-29 74 async->m.complete = regmap_spi_complete; e0356dfe Mark Brown 2013-01-29 75 async->m.context = async; e0356dfe Mark Brown 2013-01-29 76 e0356dfe Mark Brown 2013-01-29 @77 return spi_async(spi, &async->m); e0356dfe Mark Brown 2013-01-29 78 } e0356dfe Mark Brown 2013-01-29 79 e0356dfe Mark Brown 2013-01-29 80 static struct regmap_async *regmap_spi_async_alloc(void) e0356dfe Mark Brown 2013-01-29 81 { e0356dfe Mark Brown 2013-01-29 82 struct regmap_async_spi *async_spi; e0356dfe Mark Brown 2013-01-29 83 e0356dfe Mark Brown 2013-01-29 84 async_spi = kzalloc(sizeof(*async_spi), GFP_KERNEL); 95601d65 Mark Brown 2013-02-05 85 if (!async_spi) 95601d65 Mark Brown 2013-02-05 86 return NULL; e0356dfe Mark Brown 2013-01-29 87 e0356dfe Mark Brown 2013-01-29 88 return &async_spi->core; e0356dfe Mark Brown 2013-01-29 89 } e0356dfe Mark Brown 2013-01-29 90 0135bbcc Stephen Warren 2012-04-04 91 static int regmap_spi_read(void *context, a676f083 Mark Brown 2011-05-12 92 const void *reg, size_t reg_size, a676f083 Mark Brown 2011-05-12 93 void *val, size_t val_size) a676f083 Mark Brown 2011-05-12 94 { 0135bbcc Stephen Warren 2012-04-04 95 struct device *dev = context; a676f083 Mark Brown 2011-05-12 96 struct spi_device *spi = to_spi_device(dev); a676f083 Mark Brown 2011-05-12 97 a676f083 Mark Brown 2011-05-12 @98 return spi_write_then_read(spi, reg, reg_size, val, val_size); a676f083 Mark Brown 2011-05-12 99 } a676f083 Mark Brown 2011-05-12 100 :::::: The code at line 98 was first introduced by commit :::::: a676f083068b08e676c557279effbd7f4d590812 regmap: Add SPI bus support :::::: TO: Mark Brown :::::: CC: Mark Brown --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation