The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.
Signed-off-by: Zhang Shengju <redacted>
Signed-off-by: Tang Bin <redacted>
---
sound/soc/stm/stm32_spdifrx.c | 4 ----
1 file changed, 4 deletions(-)
From: Mark Brown <broonie@kernel.org> Date: 2021-08-11 11:59:07
On Wed, Aug 11, 2021 at 07:55:23PM +0800, Tang Bin wrote:
The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.
What is the benefit of not doing the check? It seems like reasonable
defensive programming.
On Wed, Aug 11, 2021 at 07:55:23PM +0800, Tang Bin wrote:
quoted
The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.
What is the benefit of not doing the check? It seems like reasonable
defensive programming.
I think it's unnecessary, because we all know than the probe function is
only trigger if
the device and the driver matches, and the trigger mode is just Device
Tree. So the device_node
must be exist in the probe function if it works. That's the reason why I
think it's redundant.
Thanks
Tang Bin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Mark Brown <broonie@kernel.org> Date: 2021-08-11 12:20:21
On Wed, Aug 11, 2021 at 08:09:00PM +0800, tangbin wrote:
On 2021/8/11 19:58, Mark Brown wrote:
quoted
On Wed, Aug 11, 2021 at 07:55:23PM +0800, Tang Bin wrote:
quoted
quoted
The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.
quoted
What is the benefit of not doing the check? It seems like reasonable
defensive programming.
I think it's unnecessary, because we all know than the probe function is
only trigger if
the device and the driver matches, and the trigger mode is just Device Tree.
So the device_node
must be exist in the probe function if it works. That's the reason why I
think it's redundant.
I see why it is redundant, I don't see what problem this redudnancy
causes.
On Wed, Aug 11, 2021 at 08:09:00PM +0800, tangbin wrote:
quoted
On 2021/8/11 19:58, Mark Brown wrote:
quoted
On Wed, Aug 11, 2021 at 07:55:23PM +0800, Tang Bin wrote:
quoted
The function stm32_spdifrx_parse_of() is only called by the function
stm32_spdifrx_probe(), and the probe function is only called with
an openfirmware platform device. Therefore there is no need to check
the device_node in probe function.
What is the benefit of not doing the check? It seems like reasonable
defensive programming.
I think it's unnecessary, because we all know than the probe function is
only trigger if
the device and the driver matches, and the trigger mode is just Device Tree.
So the device_node
must be exist in the probe function if it works. That's the reason why I
think it's redundant.
I see why it is redundant, I don't see what problem this redudnancy
causes.
Maybe not, just be redundant. If you think that's ok, just drop this patch.
I'm sorry to trouble you.
Thanks
Tang Bin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel