diff mbox series

[4/4] firmware: arm_scmi: Drop checking for shmem property in parent node

Message ID 20200327163654.13389-5-sudeep.holla@arm.com (mailing list archive)
State Mainlined
Commit 4e44590ee4a917df5ce557df4ad831ec5e82b4a6
Headers show
Series firmware: arm_scmi: Extend SMC/HVC to support multiple channels | expand

Commit Message

Sudeep Holla March 27, 2020, 4:36 p.m. UTC
The scmi protocol core driver checks for the channel availability
before evaluating the shmem property. If the individual protocols
don't have separate channel assigned to them, the channel alloted
for the BASE protocol is reused automatically.

Therefore there is no need to check for the shmem property in the
parent node if it is absent in the child protocol node.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scmi/smc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Peng Fan April 1, 2020, 1:19 a.m. UTC | #1
> -----Original Message-----
> From: Sudeep Holla <sudeep.holla@arm.com>
> Sent: 2020年3月28日 0:37
> To: linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Peng
> Fan <peng.fan@nxp.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>; f.fainelli@gmail.com;
> dl-linux-imx <linux-imx@nxp.com>
> Subject: [PATCH 4/4] firmware: arm_scmi: Drop checking for shmem property
> in parent node
> 
> The scmi protocol core driver checks for the channel availability before
> evaluating the shmem property. If the individual protocols don't have separate
> channel assigned to them, the channel alloted for the BASE protocol is reused
> automatically.
> 
> Therefore there is no need to check for the shmem property in the parent
> node if it is absent in the child protocol node.
> 
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> ---
>  drivers/firmware/arm_scmi/smc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/firmware/arm_scmi/smc.c
> b/drivers/firmware/arm_scmi/smc.c index 5929c668dc1d..833e793b5391
> 100644
> --- a/drivers/firmware/arm_scmi/smc.c
> +++ b/drivers/firmware/arm_scmi/smc.c
> @@ -60,8 +60,6 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo,
> struct device *dev,
>  		return -ENOMEM;
> 
>  	np = of_parse_phandle(cdev->of_node, "shmem", 0);
> -	if (!np)
> -		np = of_parse_phandle(dev->of_node, "shmem", 0);
>  	ret = of_address_to_resource(np, 0, &res);
>  	of_node_put(np);
>  	if (ret) {
> --
> 2.17.1
diff mbox series

Patch

diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c
index 5929c668dc1d..833e793b5391 100644
--- a/drivers/firmware/arm_scmi/smc.c
+++ b/drivers/firmware/arm_scmi/smc.c
@@ -60,8 +60,6 @@  static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
 		return -ENOMEM;
 
 	np = of_parse_phandle(cdev->of_node, "shmem", 0);
-	if (!np)
-		np = of_parse_phandle(dev->of_node, "shmem", 0);
 	ret = of_address_to_resource(np, 0, &res);
 	of_node_put(np);
 	if (ret) {