linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void
@ 2020-06-18 13:05 Maulik Shah
  2020-06-18 14:10 ` Lina Iyer
  2020-06-19  8:20 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Maulik Shah @ 2020-06-18 13:05 UTC (permalink / raw)
  To: bjorn.andersson, agross, georgi.djakov
  Cc: linux-arm-msm, linux-kernel, linux-pm, dianders, swboyd, rnayak,
	ilina, lsrao, Maulik Shah

Currently rpmh_invalidate() always returns success. Update its
return type to void.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
---
 drivers/interconnect/qcom/bcm-voter.c | 6 +-----
 drivers/soc/qcom/rpmh.c               | 4 +---
 include/soc/qcom/rpmh.h               | 7 ++++---
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
index 2a11a63..a3d2ef1 100644
--- a/drivers/interconnect/qcom/bcm-voter.c
+++ b/drivers/interconnect/qcom/bcm-voter.c
@@ -266,11 +266,7 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
 	if (!commit_idx[0])
 		goto out;
 
-	ret = rpmh_invalidate(voter->dev);
-	if (ret) {
-		pr_err("Error invalidating RPMH client (%d)\n", ret);
-		goto out;
-	}
+	rpmh_invalidate(voter->dev);
 
 	ret = rpmh_write_batch(voter->dev, RPMH_ACTIVE_ONLY_STATE,
 			       cmds, commit_idx);
diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c
index f2b5b46c..b61e183 100644
--- a/drivers/soc/qcom/rpmh.c
+++ b/drivers/soc/qcom/rpmh.c
@@ -497,7 +497,7 @@ int rpmh_flush(struct rpmh_ctrlr *ctrlr)
  *
  * Invalidate the sleep and wake values in batch_cache.
  */
-int rpmh_invalidate(const struct device *dev)
+void rpmh_invalidate(const struct device *dev)
 {
 	struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev);
 	struct batch_cache_req *req, *tmp;
@@ -509,7 +509,5 @@ int rpmh_invalidate(const struct device *dev)
 	INIT_LIST_HEAD(&ctrlr->batch_cache);
 	ctrlr->dirty = true;
 	spin_unlock_irqrestore(&ctrlr->cache_lock, flags);
-
-	return 0;
 }
 EXPORT_SYMBOL(rpmh_invalidate);
diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h
index f9ec353..bdbee1a 100644
--- a/include/soc/qcom/rpmh.h
+++ b/include/soc/qcom/rpmh.h
@@ -20,7 +20,7 @@ int rpmh_write_async(const struct device *dev, enum rpmh_state state,
 int rpmh_write_batch(const struct device *dev, enum rpmh_state state,
 		     const struct tcs_cmd *cmd, u32 *n);
 
-int rpmh_invalidate(const struct device *dev);
+void rpmh_invalidate(const struct device *dev);
 
 #else
 
@@ -38,8 +38,9 @@ static inline int rpmh_write_batch(const struct device *dev,
 				   const struct tcs_cmd *cmd, u32 *n)
 { return -ENODEV; }
 
-static inline int rpmh_invalidate(const struct device *dev)
-{ return -ENODEV; }
+static inline void rpmh_invalidate(const struct device *dev)
+{
+}
 
 #endif /* CONFIG_QCOM_RPMH */
 
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void
  2020-06-18 13:05 [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void Maulik Shah
@ 2020-06-18 14:10 ` Lina Iyer
  2020-06-19  8:20 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Lina Iyer @ 2020-06-18 14:10 UTC (permalink / raw)
  To: Maulik Shah
  Cc: bjorn.andersson, agross, georgi.djakov, linux-arm-msm,
	linux-kernel, linux-pm, dianders, swboyd, rnayak, lsrao

On Thu, Jun 18 2020 at 07:06 -0600, Maulik Shah wrote:
>Currently rpmh_invalidate() always returns success. Update its
>return type to void.
>
>Suggested-by: Stephen Boyd <swboyd@chromium.org>
>Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Lina Iyer <ilina@codeaurora.org>

>---
> drivers/interconnect/qcom/bcm-voter.c | 6 +-----
> drivers/soc/qcom/rpmh.c               | 4 +---
> include/soc/qcom/rpmh.h               | 7 ++++---
> 3 files changed, 6 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
>index 2a11a63..a3d2ef1 100644
>--- a/drivers/interconnect/qcom/bcm-voter.c
>+++ b/drivers/interconnect/qcom/bcm-voter.c
>@@ -266,11 +266,7 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
> 	if (!commit_idx[0])
> 		goto out;
>
>-	ret = rpmh_invalidate(voter->dev);
>-	if (ret) {
>-		pr_err("Error invalidating RPMH client (%d)\n", ret);
>-		goto out;
>-	}
>+	rpmh_invalidate(voter->dev);
>
> 	ret = rpmh_write_batch(voter->dev, RPMH_ACTIVE_ONLY_STATE,
> 			       cmds, commit_idx);
>diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c
>index f2b5b46c..b61e183 100644
>--- a/drivers/soc/qcom/rpmh.c
>+++ b/drivers/soc/qcom/rpmh.c
>@@ -497,7 +497,7 @@ int rpmh_flush(struct rpmh_ctrlr *ctrlr)
>  *
>  * Invalidate the sleep and wake values in batch_cache.
>  */
>-int rpmh_invalidate(const struct device *dev)
>+void rpmh_invalidate(const struct device *dev)
> {
> 	struct rpmh_ctrlr *ctrlr = get_rpmh_ctrlr(dev);
> 	struct batch_cache_req *req, *tmp;
>@@ -509,7 +509,5 @@ int rpmh_invalidate(const struct device *dev)
> 	INIT_LIST_HEAD(&ctrlr->batch_cache);
> 	ctrlr->dirty = true;
> 	spin_unlock_irqrestore(&ctrlr->cache_lock, flags);
>-
>-	return 0;
> }
> EXPORT_SYMBOL(rpmh_invalidate);
>diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h
>index f9ec353..bdbee1a 100644
>--- a/include/soc/qcom/rpmh.h
>+++ b/include/soc/qcom/rpmh.h
>@@ -20,7 +20,7 @@ int rpmh_write_async(const struct device *dev, enum rpmh_state state,
> int rpmh_write_batch(const struct device *dev, enum rpmh_state state,
> 		     const struct tcs_cmd *cmd, u32 *n);
>
>-int rpmh_invalidate(const struct device *dev);
>+void rpmh_invalidate(const struct device *dev);
>
> #else
>
>@@ -38,8 +38,9 @@ static inline int rpmh_write_batch(const struct device *dev,
> 				   const struct tcs_cmd *cmd, u32 *n)
> { return -ENODEV; }
>
>-static inline int rpmh_invalidate(const struct device *dev)
>-{ return -ENODEV; }
>+static inline void rpmh_invalidate(const struct device *dev)
>+{
>+}
>
> #endif /* CONFIG_QCOM_RPMH */
>
>-- 
>QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>of Code Aurora Forum, hosted by The Linux Foundation
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void
  2020-06-18 13:05 [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void Maulik Shah
  2020-06-18 14:10 ` Lina Iyer
@ 2020-06-19  8:20 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-06-19  8:20 UTC (permalink / raw)
  To: Maulik Shah, agross, bjorn.andersson, georgi.djakov
  Cc: linux-arm-msm, linux-kernel, linux-pm, dianders, rnayak, ilina,
	lsrao, Maulik Shah

Quoting Maulik Shah (2020-06-18 06:05:53)
> Currently rpmh_invalidate() always returns success. Update its
> return type to void.
> 
> Suggested-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-19  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 13:05 [PATCH] soc: qcom: rpmh: Update rpmh_invalidate function to return void Maulik Shah
2020-06-18 14:10 ` Lina Iyer
2020-06-19  8:20 ` Stephen Boyd

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).