[PATCH] fbtft-bus.c: Removing that prohibited space before ')'

Subsystems: fbtft framebuffer drivers, staging subsystem, the rest

STALE2258d

6 messages, 4 authors, 2020-07-09 · open the first message on its own page

[PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: B K Karthik <hidden>
Date: 2020-06-27 04:51:59

fbtft-bus.c:

fixing ERROR: space prohibited before that close parenthesis ')' by removing that space and ',' in line 65 and 67.

Signed-off-by: B K Karthik <redacted>
---
 drivers/staging/fbtft/fbtft-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 63c65dd67b17..847cbfbbd766 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:									      \
 }                                                                             \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
-- 
2.20.1

Re: [PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: Joe Perches <joe@perches.com>
Date: 2020-06-27 05:12:42

On Sat, 2020-06-27 at 00:51 -0400, B K Karthik wrote:
fbtft-bus.c:

fixing ERROR: space prohibited before that close parenthesis ')' by removing that space and ',' in line 65 and 67.
[]
quoted hunk
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 63c65dd67b17..847cbfbbd766 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:									      \
 }                                                                             \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
Q: Did you compile the files modified by this patch
   before you submitted it?
A: No

Re: [PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2020-06-27 05:12:55

On Sat, Jun 27, 2020 at 12:51:50AM -0400, B K Karthik wrote:
quoted hunk
fbtft-bus.c:

fixing ERROR: space prohibited before that close parenthesis ')' by removing that space and ',' in line 65 and 67.

Signed-off-by: B K Karthik <redacted>
---
 drivers/staging/fbtft/fbtft-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index 63c65dd67b17..847cbfbbd766 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:									      \
 }                                                                             \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
Also, did you test-build this patch?  I think this just broke the
build...

Re: [PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: kernel test robot <hidden>
Date: 2020-06-28 00:21:13

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-Removing-that-prohibited-space-before/20200627-125315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 92cd1b5d65f5c67147c7da39a3c2ad7e6ff81027
config: x86_64-randconfig-r015-20200628 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a43b99a1e38e2beffb68a6db93f216f511e7fd41)
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):
quoted
drivers/staging/fbtft/fbtft-bus.c:65:53: error: too few arguments provided to function-like macro invocation
   define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
                                                       ^
   drivers/staging/fbtft/fbtft-bus.c:14:9: note: macro 'define_fbtft_write_reg' defined here
   #define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
           ^
quoted
drivers/staging/fbtft/fbtft-bus.c:65:1: error: unknown type name 'define_fbtft_write_reg'
   define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
   ^
   drivers/staging/fbtft/fbtft-bus.c:67:57: error: too few arguments provided to function-like macro invocation
   define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
                                                           ^
   drivers/staging/fbtft/fbtft-bus.c:14:9: note: macro 'define_fbtft_write_reg' defined here
   #define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
           ^
   drivers/staging/fbtft/fbtft-bus.c:67:1: error: unknown type name 'define_fbtft_write_reg'
   define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
   ^
quoted
drivers/staging/fbtft/fbtft-bus.c:86:3: error: non-void function 'fbtft_write_reg8_bus9' should return a value [-Wreturn-type]
                   return;
                   ^
   drivers/staging/fbtft/fbtft-bus.c:109:3: error: non-void function 'fbtft_write_reg8_bus9' should return a value [-Wreturn-type]
                   return;
                   ^
   6 errors generated.

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

    64	
  > 65	define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
    66	define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
  > 67	define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
    68	
    69	void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
    70	{
    71		va_list args;
    72		int i, ret;
    73		int pad = 0;
    74		u16 *buf = (u16 *)par->buf;
    75	
    76		if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
    77			va_start(args, len);
    78			for (i = 0; i < len; i++)
    79				*(((u8 *)buf) + i) = (u8)va_arg(args, unsigned int);
    80			va_end(args);
    81			fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,
    82					  par->info->device, u8, buf, len, "%s: ",
    83					  __func__);
    84		}
    85		if (len <= 0)
  > 86			return;
    87	
    88		if (par->spi && (par->spi->bits_per_word == 8)) {
    89			/* we're emulating 9-bit, pad start of buffer with no-ops
    90			 * (assuming here that zero is a no-op)
    91			 */
    92			pad = (len % 4) ? 4 - (len % 4) : 0;
    93			for (i = 0; i < pad; i++)
    94				*buf++ = 0x000;
    95		}
    96	
    97		va_start(args, len);
    98		*buf++ = (u8)va_arg(args, unsigned int);
    99		i = len - 1;
   100		while (i--) {
   101			*buf = (u8)va_arg(args, unsigned int);
   102			*buf++ |= 0x100; /* dc=1 */
   103		}
   104		va_end(args);
   105		ret = par->fbtftops.write(par, par->buf, (len + pad) * sizeof(u16));
   106		if (ret < 0) {
   107			dev_err(par->info->device,
   108				"write() failed and returned %d\n", ret);
   109			return;
   110		}
   111	}
   112	EXPORT_SYMBOL(fbtft_write_reg8_bus9);
   113	

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

Re: [PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: kernel test robot <hidden>
Date: 2020-06-29 00:30:17

Hi K,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING 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-Removing-that-prohibited-space-before/20200627-125315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 92cd1b5d65f5c67147c7da39a3c2ad7e6ff81027
config: ia64-randconfig-s031-20200624 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=ia64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)
quoted
drivers/staging/fbtft/fbtft-bus.c:65:1: sparse: sparse: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
   drivers/staging/fbtft/fbtft-bus.c:67:1: sparse: sparse: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got void
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got (
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got =
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'for' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got <
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got ++
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'do' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got {
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got ->
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got <
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got --
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got ->
quoted
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'if' as identifier
drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got :
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:69:1: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:69:1: sparse: sparse: got void
   drivers/staging/fbtft/fbtft-bus.c:76:13: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:76:13: sparse: sparse: got (
   drivers/staging/fbtft/fbtft-bus.c:76:9: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:78:24: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:78:24: sparse: sparse: got =
   drivers/staging/fbtft/fbtft-bus.c:78:17: sparse: sparse: Trying to use reserved word 'for' as identifier
   drivers/staging/fbtft/fbtft-bus.c:78:31: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:78:31: sparse: sparse: got <
   drivers/staging/fbtft/fbtft-bus.c:78:39: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:78:39: sparse: sparse: got ++
   drivers/staging/fbtft/fbtft-bus.c:79:50: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:79:50: sparse: sparse: got +=
   drivers/staging/fbtft/fbtft-bus.c:79:50: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:79:50: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:81:17: sparse: sparse: Trying to use reserved word 'do' as identifier
   drivers/staging/fbtft/fbtft-bus.c:81:17: sparse: sparse: Expected ; at end of declaration
   drivers/staging/fbtft/fbtft-bus.c:81:17: sparse: sparse: got {
   drivers/staging/fbtft/fbtft-bus.c:81:17: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:81:17: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:84:9: sparse: sparse: Expected ; at the end of type declaration
   drivers/staging/fbtft/fbtft-bus.c:84:9: sparse: sparse: got }
   drivers/staging/fbtft/fbtft-bus.c:88:16: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:88:16: sparse: sparse: got ->
   drivers/staging/fbtft/fbtft-bus.c:88:9: sparse: sparse: Trying to use reserved word 'if' as identifier
   drivers/staging/fbtft/fbtft-bus.c:93:24: sparse: sparse: Expected ) in function declarator
   drivers/staging/fbtft/fbtft-bus.c:93:24: sparse: sparse: got =
quoted
drivers/staging/fbtft/fbtft-bus.c:93:17: sparse: sparse: too many errors
# https://github.com/0day-ci/linux/commit/f9a954fc5ae43b8fb5195dbb7152976581d80a1a
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout f9a954fc5ae43b8fb5195dbb7152976581d80a1a
vim +/define_fbtft_write_reg +65 drivers/staging/fbtft/fbtft-bus.c

c296d5f9957c03 Thomas Petazzoni   2014-12-31   64  
f9a954fc5ae43b 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)
f9a954fc5ae43b B K Karthik        2020-06-27   67  define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
c296d5f9957c03 Thomas Petazzoni   2014-12-31   68  
c296d5f9957c03 Thomas Petazzoni   2014-12-31   69  void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
c296d5f9957c03 Thomas Petazzoni   2014-12-31   70  {
c296d5f9957c03 Thomas Petazzoni   2014-12-31   71  	va_list args;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   72  	int i, ret;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   73  	int pad = 0;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   74  	u16 *buf = (u16 *)par->buf;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   75  
c296d5f9957c03 Thomas Petazzoni   2014-12-31   76  	if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
c296d5f9957c03 Thomas Petazzoni   2014-12-31   77  		va_start(args, len);
c296d5f9957c03 Thomas Petazzoni   2014-12-31   78  		for (i = 0; i < len; i++)
c296d5f9957c03 Thomas Petazzoni   2014-12-31   79  			*(((u8 *)buf) + i) = (u8)va_arg(args, unsigned int);
c296d5f9957c03 Thomas Petazzoni   2014-12-31   80  		va_end(args);
c296d5f9957c03 Thomas Petazzoni   2014-12-31  @81  		fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,
333c7b940526be Leonardo Brás      2018-08-07   82  				  par->info->device, u8, buf, len, "%s: ",
333c7b940526be Leonardo Brás      2018-08-07   83  				  __func__);
c296d5f9957c03 Thomas Petazzoni   2014-12-31   84  	}
c296d5f9957c03 Thomas Petazzoni   2014-12-31   85  	if (len <= 0)
c296d5f9957c03 Thomas Petazzoni   2014-12-31   86  		return;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   87  
c296d5f9957c03 Thomas Petazzoni   2014-12-31   88  	if (par->spi && (par->spi->bits_per_word == 8)) {
c296d5f9957c03 Thomas Petazzoni   2014-12-31   89  		/* we're emulating 9-bit, pad start of buffer with no-ops
b2ac4a927034d0 Anson Jacob        2016-08-25   90  		 * (assuming here that zero is a no-op)
b2ac4a927034d0 Anson Jacob        2016-08-25   91  		 */
c296d5f9957c03 Thomas Petazzoni   2014-12-31   92  		pad = (len % 4) ? 4 - (len % 4) : 0;
c296d5f9957c03 Thomas Petazzoni   2014-12-31  @93  		for (i = 0; i < pad; i++)
c296d5f9957c03 Thomas Petazzoni   2014-12-31   94  			*buf++ = 0x000;
c296d5f9957c03 Thomas Petazzoni   2014-12-31   95  	}
c296d5f9957c03 Thomas Petazzoni   2014-12-31   96  
c296d5f9957c03 Thomas Petazzoni   2014-12-31   97  	va_start(args, len);
c296d5f9957c03 Thomas Petazzoni   2014-12-31   98  	*buf++ = (u8)va_arg(args, unsigned int);
c296d5f9957c03 Thomas Petazzoni   2014-12-31   99  	i = len - 1;
c296d5f9957c03 Thomas Petazzoni   2014-12-31  100  	while (i--) {
c296d5f9957c03 Thomas Petazzoni   2014-12-31  101  		*buf = (u8)va_arg(args, unsigned int);
c296d5f9957c03 Thomas Petazzoni   2014-12-31  102  		*buf++ |= 0x100; /* dc=1 */
c296d5f9957c03 Thomas Petazzoni   2014-12-31  103  	}
c296d5f9957c03 Thomas Petazzoni   2014-12-31  104  	va_end(args);
c296d5f9957c03 Thomas Petazzoni   2014-12-31  105  	ret = par->fbtftops.write(par, par->buf, (len + pad) * sizeof(u16));
c296d5f9957c03 Thomas Petazzoni   2014-12-31  106  	if (ret < 0) {
c296d5f9957c03 Thomas Petazzoni   2014-12-31  107  		dev_err(par->info->device,
aed1c72e447f0a Haneen Mohammed    2015-03-06  108  			"write() failed and returned %d\n", ret);
c296d5f9957c03 Thomas Petazzoni   2014-12-31  109  		return;
c296d5f9957c03 Thomas Petazzoni   2014-12-31  110  	}
c296d5f9957c03 Thomas Petazzoni   2014-12-31  111  }
c296d5f9957c03 Thomas Petazzoni   2014-12-31  112  EXPORT_SYMBOL(fbtft_write_reg8_bus9);
c296d5f9957c03 Thomas Petazzoni   2014-12-31  113  

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

Re: [PATCH] fbtft-bus.c: Removing that prohibited space before ')'

From: kernel test robot <hidden>
Date: 2020-07-09 13:49:17

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-rc4 next-20200709]
[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-Removing-that-prohibited-space-before/20200627-125315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 92cd1b5d65f5c67147c7da39a3c2ad7e6ff81027
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc 

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

All errors (new ones prefixed by >>):
quoted
drivers/staging/fbtft/fbtft-bus.c:65:53: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
      65 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
         |                                                     ^
   drivers/staging/fbtft/fbtft-bus.c:14: note: macro "define_fbtft_write_reg" defined here
      14 | #define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
         | 
quoted
drivers/staging/fbtft/fbtft-bus.c:65:23: error: expected ';' before 'void'
      65 | define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
         |                       ^
         |                       ;
   drivers/staging/fbtft/fbtft-bus.c:67:57: error: macro "define_fbtft_write_reg" requires 4 arguments, but only 3 given
      67 | define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
         |                                                         ^
   drivers/staging/fbtft/fbtft-bus.c:14: note: macro "define_fbtft_write_reg" defined here
      14 | #define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
         | 
   drivers/staging/fbtft/fbtft-bus.c:67:23: error: expected ';' before 'void'
      67 | define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
         |                       ^
         |                       ;
      68 | 
      69 | void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
         | ~~~~                   

vim +/define_fbtft_write_reg +65 drivers/staging/fbtft/fbtft-bus.c

    64	
  > 65	define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
    66	define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
    67	define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
    68	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help