LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: fbtft: Remove prohibited spaces before ')'
@ 2020-03-11  1:25 Marcio Albano
  2020-03-11  5:39 ` kbuild test robot
  2020-03-11  6:06 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Marcio Albano @ 2020-03-11  1:25 UTC (permalink / raw)
  To: gregkh, dri-devel, linux-fbdev, devel, linux-kernel, lkcamp

Fix checkpatch errors:

"ERROR: space prohibited before that close parenthesis ')'"
in fbtft-bus.c:65 and fbtft-bus.c:67.

Signed-off-by: Marcio Albano <marcio.ahf@gmail.com>
---
 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 63c65dd67..847cbfbbd 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: fbtft: Remove prohibited spaces before ')'
  2020-03-11  1:25 [PATCH] staging: fbtft: Remove prohibited spaces before ')' Marcio Albano
@ 2020-03-11  5:39 ` kbuild test robot
  2020-03-11  6:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-03-11  5:39 UTC (permalink / raw)
  To: Marcio Albano
  Cc: kbuild-all, gregkh, dri-devel, linux-fbdev, devel, linux-kernel, lkcamp

[-- Attachment #1: Type: text/plain, Size: 5908 bytes --]

Hi Marcio,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on tegra-drm/drm/tegra/for-next v5.6-rc5 next-20200310]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Marcio-Albano/staging-fbtft-Remove-prohibited-spaces-before/20200311-095855
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 590a95e418d18894e34cd240b3e7ef278add05c7
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

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 +/define_fbtft_write_reg +65 drivers/staging/fbtft/fbtft-bus.c

     7	
     8	/*****************************************************************************
     9	 *
    10	 *   void (*write_reg)(struct fbtft_par *par, int len, ...);
    11	 *
    12	 *****************************************************************************/
    13	
    14	#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
  > 15	void func(struct fbtft_par *par, int len, ...)                                \
    16	{                                                                             \
    17		va_list args;                                                         \
    18		int i, ret;                                                           \
    19		int offset = 0;                                                       \
    20		buffer_type *buf = (buffer_type *)par->buf;                           \
    21										      \
    22		if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {                    \
    23			va_start(args, len);                                          \
    24			for (i = 0; i < len; i++) {                                   \
    25				buf[i] = modifier((data_type)va_arg(args,             \
    26								    unsigned int));   \
    27			}                                                             \
    28			va_end(args);                                                 \
    29			fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,                  \
    30					  par->info->device, buffer_type, buf, len,   \
    31					  "%s: ", __func__);                          \
    32		}                                                                     \
    33										      \
    34		va_start(args, len);                                                  \
    35										      \
    36		if (par->startbyte) {                                                 \
    37			*(u8 *)par->buf = par->startbyte;                             \
    38			buf = (buffer_type *)(par->buf + 1);                          \
    39			offset = 1;                                                   \
    40		}                                                                     \
    41										      \
    42		*buf = modifier((data_type)va_arg(args, unsigned int));               \
    43		ret = fbtft_write_buf_dc(par, par->buf, sizeof(data_type) + offset,   \
    44					 0);                                          \
    45		if (ret < 0)							      \
    46			goto out;						      \
    47		len--;                                                                \
    48										      \
    49		if (par->startbyte)                                                   \
    50			*(u8 *)par->buf = par->startbyte | 0x2;                       \
    51										      \
    52		if (len) {                                                            \
    53			i = len;                                                      \
    54			while (i--)						      \
    55				*buf++ = modifier((data_type)va_arg(args,             \
    56								    unsigned int));   \
    57			fbtft_write_buf_dc(par, par->buf,			      \
    58					   len * (sizeof(data_type) + offset), 1);    \
    59		}                                                                     \
    60	out:									      \
    61		va_end(args);                                                         \
    62	}                                                                             \
    63	EXPORT_SYMBOL(func);
    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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71368 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: fbtft: Remove prohibited spaces before ')'
  2020-03-11  1:25 [PATCH] staging: fbtft: Remove prohibited spaces before ')' Marcio Albano
  2020-03-11  5:39 ` kbuild test robot
@ 2020-03-11  6:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-03-11  6:06 UTC (permalink / raw)
  To: Marcio Albano; +Cc: dri-devel, linux-fbdev, devel, linux-kernel, lkcamp

On Wed, Mar 11, 2020 at 01:25:33AM +0000, Marcio Albano wrote:
> Fix checkpatch errors:
> 
> "ERROR: space prohibited before that close parenthesis ')'"
> in fbtft-bus.c:65 and fbtft-bus.c:67.
> 
> Signed-off-by: Marcio Albano <marcio.ahf@gmail.com>
> ---
>  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 63c65dd67..847cbfbbd 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)

Always test-build your patches :(

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-11  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11  1:25 [PATCH] staging: fbtft: Remove prohibited spaces before ')' Marcio Albano
2020-03-11  5:39 ` kbuild test robot
2020-03-11  6:06 ` Greg KH

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).