From: Jerome Brunet Date: Thu, 9 Mar 2017 10:41:46 +0000 (+0100) Subject: clk: meson: fix SET_PARM macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1ddfe82ed84a6bf09eef9067c2dc093c758eb4b4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git clk: meson: fix SET_PARM macro parameter val is not enclosed in parenthesis which is buggy when given an expression instead of a simple value Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-2-jbrunet@baylibre.com --- diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 9bb70e7a7d6a..c6be77dd8694 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -25,7 +25,7 @@ #define PARM_GET(width, shift, reg) \ (((reg) & SETPMASK(width, shift)) >> (shift)) #define PARM_SET(width, shift, reg, val) \ - (((reg) & CLRPMASK(width, shift)) | (val << (shift))) + (((reg) & CLRPMASK(width, shift)) | ((val) << (shift))) #define MESON_PARM_APPLICABLE(p) (!!((p)->width))