From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Andy Gross <agross@kernel.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Maulik Shah <mkshah@codeaurora.org>,
Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH 3/3] soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition
Date: Thu, 23 Apr 2020 22:37:48 -0700 [thread overview]
Message-ID: <20200424053748.GX20625@builder.lan> (raw)
In-Reply-To: <20200424045414.133381-4-swboyd@chromium.org>
On Thu 23 Apr 21:54 PDT 2020, Stephen Boyd wrote:
> Move the WARN_ON() into the if condition so the compiler can see that
> the branch is unlikely() and possibly optimize it better.
>
> Cc: Maulik Shah <mkshah@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/soc/qcom/rpmh-rsc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
> index 462dd267afef..f7763f008e03 100644
> --- a/drivers/soc/qcom/rpmh-rsc.c
> +++ b/drivers/soc/qcom/rpmh-rsc.c
> @@ -373,10 +373,8 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
>
> for_each_set_bit(i, &irq_status, BITS_PER_TYPE(u32)) {
> req = get_req_from_tcs(drv, i);
> - if (!req) {
> - WARN_ON(1);
> + if (WARN_ON(!req))
> goto skip;
> - }
>
> err = 0;
> for (j = 0; j < req->num_cmds; j++) {
> --
> Sent by a computer, using git, on the internet
>
next prev parent reply other threads:[~2020-04-24 5:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 4:54 [PATCH 0/3] Even moar rpmh cleanups Stephen Boyd
2020-04-24 4:54 ` [PATCH 1/3] soc: qcom: rpmh-rsc: Remove tcs_is_free() API Stephen Boyd
2020-04-24 5:36 ` Bjorn Andersson
2020-04-24 17:21 ` Stephen Boyd
2020-04-24 17:12 ` Doug Anderson
2020-04-24 17:28 ` Stephen Boyd
2020-04-24 4:54 ` [PATCH 2/3] soc: qcom: rpmh-rsc: Loop over less bits in irq handler Stephen Boyd
2020-04-24 5:37 ` Bjorn Andersson
2020-04-24 17:11 ` Doug Anderson
2020-04-24 17:13 ` Doug Anderson
2020-04-24 17:27 ` Stephen Boyd
2020-04-24 4:54 ` [PATCH 3/3] soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition Stephen Boyd
2020-04-24 5:37 ` Bjorn Andersson [this message]
2020-04-24 17:11 ` Doug Anderson
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=20200424053748.GX20625@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=dianders@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkshah@codeaurora.org \
--cc=swboyd@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.