From: Stephen Boyd <swboyd@chromium.org>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-kernel@vger.kernel.org, Maulik Shah <mkshah@codeaurora.org>,
Douglas Anderson <dianders@chromium.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: [PATCH v3 2/3] soc: qcom: rpmh-rsc: Loop over fewer bits in irq handler
Date: Wed, 20 May 2020 18:21:18 -0700 [thread overview]
Message-ID: <20200521012119.238270-3-swboyd@chromium.org> (raw)
In-Reply-To: <20200521012119.238270-1-swboyd@chromium.org>
readl() returns a u32, and BITS_PER_LONG is different on 32-bit vs.
64-bit architectures. Let's loop over the possible bits set in that type
instead of looping over more bits than we ever may need to.
Cc: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/soc/qcom/rpmh-rsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index 60fc56987659..ce725d4ff097 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -383,7 +383,7 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
irq_status = readl_relaxed(drv->tcs_base + RSC_DRV_IRQ_STATUS);
- for_each_set_bit(i, &irq_status, BITS_PER_LONG) {
+ for_each_set_bit(i, &irq_status, BITS_PER_TYPE(u32)) {
req = get_req_from_tcs(drv, i);
if (!req) {
WARN_ON(1);
--
Sent by a computer, using git, on the internet
next prev parent reply other threads:[~2020-05-21 1:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 1:21 [PATCH v3 0/3] Even moar rpmh cleanups Stephen Boyd
2020-05-21 1:21 ` [PATCH v3 1/3] soc: qcom: rpmh-rsc: Remove tcs_is_free() API Stephen Boyd
2020-05-21 1:21 ` Stephen Boyd [this message]
2020-05-21 1:21 ` [PATCH v3 3/3] soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition Stephen Boyd
2020-05-21 3:07 ` [PATCH v3 0/3] Even moar rpmh cleanups Bjorn Andersson
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=20200521012119.238270-3-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkshah@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
all inboxes | Powered by JetHome®