linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: DeepanshuPratik <deepanshu.pratik@gmail.com>, andy@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org,
	linux-fbdev@vger.kernel.org,
	DeepanshuPratik <deepanshu.pratik@gmail.com>
Subject: Re: [PATCH] staging: fbtft: fix macro usage and style warnings
Date: Sat, 20 Sep 2025 16:37:23 +0800	[thread overview]
Message-ID: <202509201601.hTKUjeIe-lkp@intel.com> (raw)
In-Reply-To: <20250919212938.822374-1-deepanshu.pratik@gmail.com>

Hi DeepanshuPratik,

kernel test robot noticed the following build errors:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/DeepanshuPratik/staging-fbtft-fix-macro-usage-and-style-warnings/20250920-053248
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20250919212938.822374-1-deepanshu.pratik%40gmail.com
patch subject: [PATCH] staging: fbtft: fix macro usage and style warnings
config: x86_64-buildonly-randconfig-002-20250920 (https://download.01.org/0day-ci/archive/20250920/202509201601.hTKUjeIe-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250920/202509201601.hTKUjeIe-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/202509201601.hTKUjeIe-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/staging/fbtft/fbtft-bus.c:15:2: error: '#' is not followed by a macro parameter
      15 | #define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
         |  ^
>> drivers/staging/fbtft/fbtft-bus.c:66:47: error: unexpected type name 'u8': expected identifier
      66 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, NOOP)
         |                                               ^
   drivers/staging/fbtft/fbtft-bus.c:66:51: error: unexpected type name 'u8': expected identifier
      66 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, NOOP)
         |                                                   ^
>> drivers/staging/fbtft/fbtft-bus.c:66:51: error: redefinition of parameter 'u8'
>> drivers/staging/fbtft/fbtft-bus.c:67:1: error: expected function body after function declarator
      67 | define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
         | ^
   5 errors generated.


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

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

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-09-20  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19 21:29 [PATCH] staging: fbtft: fix macro usage and style warnings DeepanshuPratik
2025-09-20  8:37 ` kernel test robot [this message]
2025-10-13 20:51 ` Andy Shevchenko

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=202509201601.hTKUjeIe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy@kernel.org \
    --cc=deepanshu.pratik@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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;
as well as URLs for NNTP newsgroup(s).