diff mbox series

remoteproc: qcom_q6v5_mss: remove unnecessary (void*) conversions

Message ID 20230316091902.20765-1-yuzhe@nfschina.com (mailing list archive)
State Queued
Headers show
Series remoteproc: qcom_q6v5_mss: remove unnecessary (void*) conversions | expand

Commit Message

Yu Zhe March 16, 2023, 9:19 a.m. UTC
Pointer variables of void * type do not require type cast.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
 drivers/remoteproc/qcom_q6v5_mss.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mukesh Ojha March 16, 2023, 10:34 a.m. UTC | #1
On 3/16/2023 2:49 PM, Yu Zhe wrote:
> Pointer variables of void * type do not require type cast.
> 
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
> ---
>   drivers/remoteproc/qcom_q6v5_mss.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index ab053084f7a2..e7a67c8c16a0 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -1562,7 +1562,7 @@ static void qcom_q6v5_dump_segment(struct rproc *rproc,
>   
>   static int q6v5_start(struct rproc *rproc)
>   {
> -	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
> +	struct q6v5 *qproc = rproc->priv;
>   	int xfermemop_ret;
>   	int ret;
>   
> @@ -1604,7 +1604,7 @@ static int q6v5_start(struct rproc *rproc)
>   
>   static int q6v5_stop(struct rproc *rproc)
>   {
> -	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
> +	struct q6v5 *qproc = rproc->priv;
>   	int ret;
>   
>   	ret = qcom_q6v5_request_stop(&qproc->q6v5, qproc->sysmon);
> @@ -1662,7 +1662,7 @@ static int qcom_q6v5_register_dump_segments(struct rproc *rproc,
>   
>   static unsigned long q6v5_panic(struct rproc *rproc)
>   {
> -	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
> +	struct q6v5 *qproc = rproc->priv;
>   
>   	return qcom_q6v5_panic(&qproc->q6v5);
>   }
> @@ -1977,7 +1977,7 @@ static int q6v5_probe(struct platform_device *pdev)
>   	rproc->auto_boot = false;
>   	rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
>   
> -	qproc = (struct q6v5 *)rproc->priv;
> +	qproc = rproc->priv;
>   	qproc->dev = &pdev->dev;
>   	qproc->rproc = rproc;
>   	qproc->hexagon_mdt_image = "modem.mdt";

Well, there is quite a few files under driver/remoteproc/ which has this 
kind of assignation.

Do you intend to do this for all ?

Acked-by: Mukesh Ojha <quic_mojha@quicinc.com>

-- Mukesh
diff mbox series

Patch

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index ab053084f7a2..e7a67c8c16a0 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1562,7 +1562,7 @@  static void qcom_q6v5_dump_segment(struct rproc *rproc,
 
 static int q6v5_start(struct rproc *rproc)
 {
-	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
+	struct q6v5 *qproc = rproc->priv;
 	int xfermemop_ret;
 	int ret;
 
@@ -1604,7 +1604,7 @@  static int q6v5_start(struct rproc *rproc)
 
 static int q6v5_stop(struct rproc *rproc)
 {
-	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
+	struct q6v5 *qproc = rproc->priv;
 	int ret;
 
 	ret = qcom_q6v5_request_stop(&qproc->q6v5, qproc->sysmon);
@@ -1662,7 +1662,7 @@  static int qcom_q6v5_register_dump_segments(struct rproc *rproc,
 
 static unsigned long q6v5_panic(struct rproc *rproc)
 {
-	struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
+	struct q6v5 *qproc = rproc->priv;
 
 	return qcom_q6v5_panic(&qproc->q6v5);
 }
@@ -1977,7 +1977,7 @@  static int q6v5_probe(struct platform_device *pdev)
 	rproc->auto_boot = false;
 	rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);
 
-	qproc = (struct q6v5 *)rproc->priv;
+	qproc = rproc->priv;
 	qproc->dev = &pdev->dev;
 	qproc->rproc = rproc;
 	qproc->hexagon_mdt_image = "modem.mdt";