* [PATCH 1/2] staging: fbtft: Moves ";" from macro definition to macro usage. [not found] <cover.1533857298.git.leobras.c@gmail.com> @ 2018-08-09 23:28 ` Leonardo Brás 2018-08-10 11:27 ` kbuild test robot 2018-08-09 23:29 ` [PATCH 2/2] staging: fbtft: Adds space around "/" Leonardo Brás 1 sibling, 1 reply; 3+ messages in thread From: Leonardo Brás @ 2018-08-09 23:28 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: Greg Kroah-Hartman, devel, linux-kernel This makes the macro usage more like a function declaration. Also, ending a macro definition with ";" is not recommended by checkpatch.pl. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> --- drivers/staging/fbtft/fbtft-bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 8ce1ff9b6c2a..274388313780 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -60,11 +60,11 @@ void func(struct fbtft_par *par, int len, ...) \ out: \ va_end(args); \ } \ -EXPORT_SYMBOL(func); +EXPORT_SYMBOL(func) -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_reg8_bus8, u8, u8, ); +define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, ); +define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, ); void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) { -- 2.18.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] staging: fbtft: Moves ";" from macro definition to macro usage. 2018-08-09 23:28 ` [PATCH 1/2] staging: fbtft: Moves ";" from macro definition to macro usage Leonardo Brás @ 2018-08-10 11:27 ` kbuild test robot 0 siblings, 0 replies; 3+ messages in thread From: kbuild test robot @ 2018-08-10 11:27 UTC (permalink / raw) To: Leonardo Brás Cc: kbuild-all, Thomas Petazzoni, Greg Kroah-Hartman, devel, linux-kernel Hi Leonardo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.18-rc8 next-20180809] [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/Leonardo-Br-s/staging-fbtft-Moves-from-macro-definition-to-macro-usage/20180810-154004 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] <noident> @@ got unsignedrestricted __be16 [usertype] <noident> @@ drivers/staging/fbtft/fbtft-bus.c:66:1: expected restricted __be16 [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:66:1: got unsigned short [unsigned] [usertype] <noident> >> drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] <noident> @@ got unsignedrestricted __be16 [usertype] <noident> @@ drivers/staging/fbtft/fbtft-bus.c:66:1: expected restricted __be16 [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:66:1: got unsigned short [unsigned] [usertype] <noident> >> drivers/staging/fbtft/fbtft-bus.c:66:1: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] <noident> @@ got unsignedrestricted __be16 [usertype] <noident> @@ drivers/staging/fbtft/fbtft-bus.c:66:1: expected restricted __be16 [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:66:1: got unsigned short [unsigned] [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:156:27: sparse: expression using sizeof(void) drivers/staging/fbtft/fbtft-bus.c:156:27: sparse: expression using sizeof(void) drivers/staging/fbtft/fbtft-bus.c:200:27: sparse: expression using sizeof(void) drivers/staging/fbtft/fbtft-bus.c:200:27: sparse: expression using sizeof(void) vim +66 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, ); 67 define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, ); 68 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] staging: fbtft: Adds space around "/" [not found] <cover.1533857298.git.leobras.c@gmail.com> 2018-08-09 23:28 ` [PATCH 1/2] staging: fbtft: Moves ";" from macro definition to macro usage Leonardo Brás @ 2018-08-09 23:29 ` Leonardo Brás 1 sibling, 0 replies; 3+ messages in thread From: Leonardo Brás @ 2018-08-09 23:29 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: Greg Kroah-Hartman, devel, linux-kernel Kernel coding style recommends a space char around "/". Signed-off-by: Leonardo Brás <leobras.c@gmail.com> --- drivers/staging/fbtft/fbtft.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h index 798a8fe98e95..25302ffc4000 100644 --- a/drivers/staging/fbtft/fbtft.h +++ b/drivers/staging/fbtft/fbtft.h @@ -232,7 +232,7 @@ struct fbtft_par { bool polarity; }; -#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int)) +#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__}) / sizeof(int)) #define write_reg(par, ...) \ ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__)) -- 2.18.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-10 11:28 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <cover.1533857298.git.leobras.c@gmail.com> 2018-08-09 23:28 ` [PATCH 1/2] staging: fbtft: Moves ";" from macro definition to macro usage Leonardo Brás 2018-08-10 11:27 ` kbuild test robot 2018-08-09 23:29 ` [PATCH 2/2] staging: fbtft: Adds space around "/" Leonardo Brás
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).