soc: qcom: rpmh: Update rpmh_invalidate function to return void
Subsystems (3)
PATCH 1/1 soc: qcom: rpmh: Update rpmh_invalidate function to return void
Currently rpmh_invalidate() always returns success. Update its return type to void.
Suggested-by Stephen Boyd <[email protected]>
Signed-off-by Maulik Shah <[email protected]>
--- 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(-)
drivers/interconnect/qcom/bcm-voter.c +1 -5
@@ -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);
drivers/soc/qcom/rpmh.c +1 -3
@@ -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);
include/soc/qcom/rpmh.h +4 -3
@@ -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 */
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Quoted 5 lines · Maulik Shah
Currently
rpmh_invalidate()always returns success. Update its return type to void.Suggested-by Stephen Boyd <[email protected]>Signed-off-by Maulik Shah <[email protected]>
Reviewed-by Lina Iyer <[email protected]>
Quoted 73 lines
---
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(-)drivers/interconnect/qcom/bcm-voter.c +1
-5@@ -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);drivers/soc/qcom/rpmh.c +1
-3@@ -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);include/soc/qcom/rpmh.h +4
-3@@ -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 */ Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Quoting Maulik Shah (2020-06-18 06:05:53)
Quoted 6 lines
Currently
rpmh_invalidate()always returns success. Update its return type to void.Suggested-by Stephen Boyd <[email protected]>Signed-off-by Maulik Shah <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>