[PATCH v4] media: ABS macro parameter parenthesization

2017-12-25 Thread Dan Gopstein
From: Dan Gopstein Replace usages of the locally defined ABS() macro with calls to the canonical abs() from kernel.h and remove the old definitions of ABS() This change was originally motivated by two local definitions of the ABS (absolute value) macro that fail to parenthesize their parameter

[PATCH v3] media: ABS macro parameter parenthesization

2017-12-24 Thread Dan Gopstein
From: Dan Gopstein Replace usages of the locally defined ABS() macro with calls to the canonical abs() from kernel.h and remove the old definitions of ABS() Signed-off-by: Dan Gopstein --- v2->v3: * replace local ABS() with kernel's abs() v1->v2: * unmangled the patch * added

[PATCH] media: ABS macro parameter parenthesization

2017-11-16 Thread Dan Gopstein
From: Dan Gopstein Two definitions of the ABS (absolute value) macro fail to parenthesize their parameter properly. This can lead to a bad expansion for low-precedence expression arguments. Add parens to protect against troublesome arguments. Signed-off-by: Dan Gopstein --- See an example bad