From: Kevin Hilman <khilman@baylibre.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Carlo Caione <carlo@caione.org>,
linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: meson: fix SET_PARM macro
Date: Tue, 28 Feb 2017 10:04:05 -0800 [thread overview]
Message-ID: <m24lze19be.fsf@baylibre.com> (raw)
In-Reply-To: <20170228093016.5624-1-jbrunet@baylibre.com> (Jerome Brunet's message of "Tue, 28 Feb 2017 10:30:16 +0100")
Jerome Brunet <jbrunet@baylibre.com> writes:
> parameter val is not enclosed in parenthesis which is buggy when given an
> expression instead of a simple value
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
> ---
> drivers/clk/meson/clkc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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))
next prev parent reply other threads:[~2017-02-28 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 9:30 [PATCH] clk: meson: fix SET_PARM macro Jerome Brunet
2017-02-28 18:04 ` Kevin Hilman [this message]
2017-02-28 21:26 ` Stephen Boyd
2017-02-28 21:41 ` Jerome Brunet
2017-03-01 19:03 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24lze19be.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=carlo@caione.org \
--cc=jbrunet@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).