* [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
@ 2022-09-23 15:57 Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
slim_disable_stream() and slim_stream_unprepare() are exported, so add
sanity checks preventing unmatched/invalid calls.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/stream.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/slimbus/stream.c b/drivers/slimbus/stream.c
index 75f87b3d8b95..7bb073ca6006 100644
--- a/drivers/slimbus/stream.c
+++ b/drivers/slimbus/stream.c
@@ -407,6 +407,9 @@ int slim_stream_disable(struct slim_stream_runtime *stream)
struct slim_controller *ctrl = stream->dev->ctrl;
int ret, i;
+ if (!stream->ports || !stream->num_ports)
+ return -EINVAL;
+
if (ctrl->disable_stream)
ctrl->disable_stream(stream);
@@ -438,6 +441,9 @@ int slim_stream_unprepare(struct slim_stream_runtime *stream)
{
int i;
+ if (!stream->ports || !stream->num_ports)
+ return -EINVAL;
+
for (i = 0; i < stream->num_ports; i++)
slim_disconnect_port(stream, &stream->ports[i]);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
@ 2022-09-23 15:57 ` Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Bindings require usage of fallback "qcom,slim" compatible, so
"qcom,apq8064-slim" is redundant.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/qcom-ctrl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index c0c4f895d76e..bb106eab8ae2 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -718,7 +718,6 @@ static const struct dev_pm_ops qcom_slim_dev_pm_ops = {
static const struct of_device_id qcom_slim_dt_match[] = {
{ .compatible = "qcom,slim", },
- { .compatible = "qcom,apq8064-slim", },
{}
};
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible
@ 2022-09-23 15:57 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Bindings require usage of fallback "qcom,slim" compatible, so
"qcom,apq8064-slim" is redundant.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/qcom-ctrl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index c0c4f895d76e..bb106eab8ae2 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -718,7 +718,6 @@ static const struct dev_pm_ops qcom_slim_dev_pm_ops = {
static const struct of_device_id qcom_slim_dt_match[] = {
{ .compatible = "qcom,slim", },
- { .compatible = "qcom,apq8064-slim", },
{}
};
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname()
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
@ 2022-09-23 15:57 ` Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Krzysztof Kozlowski
` (4 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Simplify the code with devm_platform_ioremap_resource_byname().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/qcom-ctrl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index bb106eab8ae2..400b7b385a44 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -488,7 +488,6 @@ static int qcom_slim_probe(struct platform_device *pdev)
{
struct qcom_slim_ctrl *ctrl;
struct slim_controller *sctrl;
- struct resource *slim_mem;
int ret, ver;
ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
@@ -519,8 +518,7 @@ static int qcom_slim_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctrl);
dev_set_drvdata(ctrl->dev, ctrl);
- slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
- ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem);
+ ctrl->base = devm_platform_ioremap_resource_byname(pdev, "ctrl");
if (IS_ERR(ctrl->base))
return PTR_ERR(ctrl->base);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource()
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
@ 2022-09-23 15:57 ` Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Krzysztof Kozlowski
` (3 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Simplify the code with devm_platform_get_and_ioremap_resource().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index cec11aa106bf..548dd7661334 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1522,7 +1522,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct qcom_slim_ngd_ctrl *ctrl;
- struct resource *res;
int ret;
struct pdr_service *pds;
@@ -1532,8 +1531,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
dev_set_drvdata(dev, ctrl);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctrl->base = devm_ioremap_resource(dev, res);
+ ctrl->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(ctrl->base))
return PTR_ERR(ctrl->base);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
` (2 preceding siblings ...)
2022-09-23 15:57 ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Krzysztof Kozlowski
@ 2022-09-23 15:57 ` Krzysztof Kozlowski
2022-10-26 16:30 ` Krzysztof Kozlowski
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-23 15:57 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-msm, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Reinitialize the reconf completion flag when ngd registers are
not retainied or when enumeration is lost for ngd.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 548dd7661334..e8ebfcd0655c 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1136,6 +1136,12 @@ static int qcom_slim_ngd_power_up(struct qcom_slim_ngd_ctrl *ctrl)
return 0;
}
+ /*
+ * Reinitialize only when registers are not retained or when enumeration
+ * is lost for ngd.
+ */
+ reinit_completion(&ctrl->reconf);
+
writel_relaxed(DEF_NGD_INT_MASK, ngd->base + NGD_INT_EN);
rx_msgq = readl_relaxed(ngd->base + NGD_RX_MSGQ_CFG);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
(?)
@ 2022-09-26 8:03 ` Neil Armstrong
-1 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2022-09-26 8:03 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Srinivas Kandagatla, linux-arm-msm, alsa-devel, linux-kernel
On 23/09/2022 17:57, Krzysztof Kozlowski wrote:
> Bindings require usage of fallback "qcom,slim" compatible, so
> "qcom,apq8064-slim" is redundant.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/slimbus/qcom-ctrl.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
> index c0c4f895d76e..bb106eab8ae2 100644
> --- a/drivers/slimbus/qcom-ctrl.c
> +++ b/drivers/slimbus/qcom-ctrl.c
> @@ -718,7 +718,6 @@ static const struct dev_pm_ops qcom_slim_dev_pm_ops = {
>
> static const struct of_device_id qcom_slim_dt_match[] = {
> { .compatible = "qcom,slim", },
> - { .compatible = "qcom,apq8064-slim", },
> {}
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname()
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
@ 2022-09-26 8:03 ` Neil Armstrong
0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2022-09-26 8:03 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Srinivas Kandagatla, linux-arm-msm, alsa-devel, linux-kernel
On 23/09/2022 17:57, Krzysztof Kozlowski wrote:
> Simplify the code with devm_platform_ioremap_resource_byname().
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/slimbus/qcom-ctrl.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
> index bb106eab8ae2..400b7b385a44 100644
> --- a/drivers/slimbus/qcom-ctrl.c
> +++ b/drivers/slimbus/qcom-ctrl.c
> @@ -488,7 +488,6 @@ static int qcom_slim_probe(struct platform_device *pdev)
> {
> struct qcom_slim_ctrl *ctrl;
> struct slim_controller *sctrl;
> - struct resource *slim_mem;
> int ret, ver;
>
> ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
> @@ -519,8 +518,7 @@ static int qcom_slim_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, ctrl);
> dev_set_drvdata(ctrl->dev, ctrl);
>
> - slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
> - ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem);
> + ctrl->base = devm_platform_ioremap_resource_byname(pdev, "ctrl");
> if (IS_ERR(ctrl->base))
> return PTR_ERR(ctrl->base);
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource()
2022-09-23 15:57 ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Krzysztof Kozlowski
@ 2022-09-26 8:03 ` Neil Armstrong
0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2022-09-26 8:03 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Srinivas Kandagatla, linux-arm-msm, alsa-devel, linux-kernel
On 23/09/2022 17:57, Krzysztof Kozlowski wrote:
> Simplify the code with devm_platform_get_and_ioremap_resource().
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/slimbus/qcom-ngd-ctrl.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index cec11aa106bf..548dd7661334 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1522,7 +1522,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct qcom_slim_ngd_ctrl *ctrl;
> - struct resource *res;
> int ret;
> struct pdr_service *pds;
>
> @@ -1532,8 +1531,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>
> dev_set_drvdata(dev, ctrl);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - ctrl->base = devm_ioremap_resource(dev, res);
> + ctrl->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
> if (IS_ERR(ctrl->base))
> return PTR_ERR(ctrl->base);
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
@ 2022-10-26 16:30 ` Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-26 16:30 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: alsa-devel, linux-arm-msm, linux-kernel, Bjorn Andersson,
Andy Gross, Konrad Dybcio
On 23/09/2022 11:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/slimbus/stream.c | 6 ++++++
Hi Srini,
Any comments on these patches? Can they be picked up?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
@ 2022-10-26 16:30 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-26 16:30 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: alsa-devel, linux-arm-msm, Bjorn Andersson, Konrad Dybcio,
linux-kernel, Andy Gross
On 23/09/2022 11:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/slimbus/stream.c | 6 ++++++
Hi Srini,
Any comments on these patches? Can they be picked up?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
@ 2022-10-26 16:31 ` Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-26 16:31 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Konrad Dybcio, Andy Gross, linux-arm-msm, alsa-devel,
Bjorn Andersson, linux-kernel
On 23/09/2022 11:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Hi Srini,
This patchset is also waiting for a month without comments.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
@ 2022-10-26 16:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-26 16:31 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: alsa-devel, linux-arm-msm, Bjorn Andersson, Konrad Dybcio,
linux-kernel, Andy Gross
On 23/09/2022 11:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Hi Srini,
This patchset is also waiting for a month without comments.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
` (5 preceding siblings ...)
2022-10-26 16:31 ` Krzysztof Kozlowski
@ 2022-10-31 18:28 ` Srinivas Kandagatla
6 siblings, 0 replies; 14+ messages in thread
From: Srinivas Kandagatla @ 2022-10-31 18:28 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm, alsa-devel, linux-kernel
On 23/09/2022 16:57, Krzysztof Kozlowski wrote:
> slim_disable_stream() and slim_stream_unprepare() are exported, so add
> sanity checks preventing unmatched/invalid calls.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Applied all.
thanks,
--srini
> drivers/slimbus/stream.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/slimbus/stream.c b/drivers/slimbus/stream.c
> index 75f87b3d8b95..7bb073ca6006 100644
> --- a/drivers/slimbus/stream.c
> +++ b/drivers/slimbus/stream.c
> @@ -407,6 +407,9 @@ int slim_stream_disable(struct slim_stream_runtime *stream)
> struct slim_controller *ctrl = stream->dev->ctrl;
> int ret, i;
>
> + if (!stream->ports || !stream->num_ports)
> + return -EINVAL;
> +
> if (ctrl->disable_stream)
> ctrl->disable_stream(stream);
>
> @@ -438,6 +441,9 @@ int slim_stream_unprepare(struct slim_stream_runtime *stream)
> {
> int i;
>
> + if (!stream->ports || !stream->num_ports)
> + return -EINVAL;
> +
> for (i = 0; i < stream->num_ports; i++)
> slim_disconnect_port(stream, &stream->ports[i]);
>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-10-31 18:28 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 15:57 [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Krzysztof Kozlowski
2022-09-23 15:57 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Krzysztof Kozlowski
2022-09-26 8:03 ` [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom,apq8064-slim compatible Neil Armstrong
2022-09-23 15:57 ` [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Krzysztof Kozlowski
2022-09-26 8:03 ` Neil Armstrong
2022-09-23 15:57 ` [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Krzysztof Kozlowski
2022-10-26 16:30 ` [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Krzysztof Kozlowski
2022-10-26 16:30 ` Krzysztof Kozlowski
2022-10-26 16:31 ` Krzysztof Kozlowski
2022-10-26 16:31 ` Krzysztof Kozlowski
2022-10-31 18:28 ` Srinivas Kandagatla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.