From: Andrew Morton ERROR: need space after that ',' (ctx:VxV) #53: FILE: include/linux/kernel.h:354: +#define clamp(val,min,max) ({ \ ^ ERROR: need space after that ',' (ctx:VxV) #74: FILE: include/linux/kernel.h:369: +#define min_t(type,x,y) ({ \ ^ ERROR: need space after that ',' (ctx:VxV) #79: FILE: include/linux/kernel.h:374: +#define max_t(type,x,y) ({ \ ^ ERROR: need space after that ',' (ctx:VxV) #84: FILE: include/linux/kernel.h:379: +#define clamp_t(type,val,min,max) ({ \ ^ ERROR: need space after that ',' (ctx:VxV) #84: FILE: include/linux/kernel.h:379: +#define clamp_t(type,val,min,max) ({ \ ^ total: 5 errors, 0 warnings, 71 lines checked ./patches/kernel-add-clamp-and-clamp_t-macros.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Harvey Harrison Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- include/linux/kernel.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN include/linux/kernel.h~kernel-add-clamp-and-clamp_t-macros-checkpatch-fixes include/linux/kernel.h --- a/include/linux/kernel.h~kernel-add-clamp-and-clamp_t-macros-checkpatch-fixes +++ a/include/linux/kernel.h @@ -350,7 +350,7 @@ extern void print_hex_dump_bytes(const c (void) (&_max1 == &_max2); \ _max1 > _max2 ? _max1 : _max2; }) -#define clamp(val,min,max) ({ \ +#define clamp(val, min, max) ({ \ typeof(val) __val = (val); \ typeof(min) __min = (min); \ typeof(max) __max = (max); \ @@ -365,17 +365,17 @@ extern void print_hex_dump_bytes(const c * * Or not use min/max/clamp at all, of course. */ -#define min_t(type,x,y) ({ \ +#define min_t(type, x, y) ({ \ type __min1 = (x); \ type __min2 = (y); \ __min1 < __min2 ? __min1: __min2; }) -#define max_t(type,x,y) ({ \ +#define max_t(type, x, y) ({ \ type __max1 = (x); \ type __max2 = (y); \ __max1 > __max2 ? __max1: __max2; }) -#define clamp_t(type,val,min,max) ({ \ +#define clamp_t(type, val, min, max) ({ \ type __val = (val); \ type __min = (min); \ type __max = (max); \ _