Re: [PATCH] fbtft-bus.c:

From: kernel test robot
Date: Sat Jun 27 2020 - 04:43:01 EST


Hi K,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v5.8-rc2 next-20200626]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/B-K-Karthik/fbtft-bus-c/20200627-125213
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 92cd1b5d65f5c67147c7da39a3c2ad7e6ff81027
config: i386-randconfig-a005-20200624 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

drivers/staging/fbtft/fbtft-bus.c:65:53: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
^
>> drivers/staging/fbtft/fbtft-bus.c:15:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
void func(struct fbtft_par *par, int len, ...) \
^
>> drivers/staging/fbtft/fbtft-bus.c:66:1: note: in expansion of macro 'define_fbtft_write_reg'
define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
^~~~~~~~~~~~~~~~~~~~~~
drivers/staging/fbtft/fbtft-bus.c:67:57: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
^
drivers/staging/fbtft/fbtft-bus.c:69:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
^~~~

vim +15 drivers/staging/fbtft/fbtft-bus.c

c296d5f9957c03 Thomas Petazzoni 2014-12-31 7
c296d5f9957c03 Thomas Petazzoni 2014-12-31 8 /*****************************************************************************
c296d5f9957c03 Thomas Petazzoni 2014-12-31 9 *
c296d5f9957c03 Thomas Petazzoni 2014-12-31 10 * void (*write_reg)(struct fbtft_par *par, int len, ...);
c296d5f9957c03 Thomas Petazzoni 2014-12-31 11 *
c296d5f9957c03 Thomas Petazzoni 2014-12-31 12 *****************************************************************************/
c296d5f9957c03 Thomas Petazzoni 2014-12-31 13
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 14 #define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 @15 void func(struct fbtft_par *par, int len, ...) \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 16 { \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 17 va_list args; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 18 int i, ret; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 19 int offset = 0; \
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 20 buffer_type *buf = (buffer_type *)par->buf; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 21 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 22 if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) { \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 23 va_start(args, len); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 24 for (i = 0; i < len; i++) { \
cc1c0eea8527bd Renato Soma 2018-04-17 25 buf[i] = modifier((data_type)va_arg(args, \
cc1c0eea8527bd Renato Soma 2018-04-17 26 unsigned int)); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 27 } \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 28 va_end(args); \
cc1c0eea8527bd Renato Soma 2018-04-17 29 fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, \
cc1c0eea8527bd Renato Soma 2018-04-17 30 par->info->device, buffer_type, buf, len, \
cc1c0eea8527bd Renato Soma 2018-04-17 31 "%s: ", __func__); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 32 } \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 33 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 34 va_start(args, len); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 35 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 36 if (par->startbyte) { \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 37 *(u8 *)par->buf = par->startbyte; \
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 38 buf = (buffer_type *)(par->buf + 1); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 39 offset = 1; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 40 } \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 41 \
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 42 *buf = modifier((data_type)va_arg(args, unsigned int)); \
cc1c0eea8527bd Renato Soma 2018-04-17 43 ret = fbtft_write_buf_dc(par, par->buf, sizeof(data_type) + offset, \
cc1c0eea8527bd Renato Soma 2018-04-17 44 0); \
e70065fdc11d86 Heiner Kallweit 2017-03-02 45 if (ret < 0) \
e70065fdc11d86 Heiner Kallweit 2017-03-02 46 goto out; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 47 len--; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 48 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 49 if (par->startbyte) \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 50 *(u8 *)par->buf = par->startbyte | 0x2; \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 51 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 52 if (len) { \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 53 i = len; \
e70065fdc11d86 Heiner Kallweit 2017-03-02 54 while (i--) \
cc1c0eea8527bd Renato Soma 2018-04-17 55 *buf++ = modifier((data_type)va_arg(args, \
cc1c0eea8527bd Renato Soma 2018-04-17 56 unsigned int)); \
e70065fdc11d86 Heiner Kallweit 2017-03-02 57 fbtft_write_buf_dc(par, par->buf, \
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 58 len * (sizeof(data_type) + offset), 1); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 59 } \
e70065fdc11d86 Heiner Kallweit 2017-03-02 60 out: \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 61 va_end(args); \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 62 } \
c296d5f9957c03 Thomas Petazzoni 2014-12-31 63 EXPORT_SYMBOL(func);
c296d5f9957c03 Thomas Petazzoni 2014-12-31 64
31b9aef1a7ba07 B K Karthik 2020-06-27 @65 define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
8d8825b420ffb3 Alfonso Lima Astor 2017-10-17 @66 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
31b9aef1a7ba07 B K Karthik 2020-06-27 67 define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
c296d5f9957c03 Thomas Petazzoni 2014-12-31 68

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip