diff mbox series

iommu: qcom-smmu: allow SID 0

Message ID 20241113050214.1845595-1-caleb.connolly@linaro.org
State New
Headers show
Series iommu: qcom-smmu: allow SID 0 | expand

Commit Message

Caleb Connolly Nov. 13, 2024, 5 a.m. UTC
It turns out this is a very real stream ID. Who woulda thought?

Drop the 0 check on the SID, there's no reason for it to be there in the first
place.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 drivers/iommu/qcom-hyp-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Neil Armstrong Nov. 14, 2024, 11:05 a.m. UTC | #1
On 13/11/2024 06:00, Caleb Connolly wrote:
> It turns out this is a very real stream ID. Who woulda thought?
> 
> Drop the 0 check on the SID, there's no reason for it to be there in the first
> place.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   drivers/iommu/qcom-hyp-smmu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/qcom-hyp-smmu.c b/drivers/iommu/qcom-hyp-smmu.c
> index 1b5a09bb7b39..7e07487ad384 100644
> --- a/drivers/iommu/qcom-hyp-smmu.c
> +++ b/drivers/iommu/qcom-hyp-smmu.c
> @@ -133,9 +133,9 @@ static int get_stream_id(struct udevice *dev)
>   	struct ofnode_phandle_args args;
>   	int count = ofnode_parse_phandle_with_args(node, "iommus",
>   						   "#iommu-cells", 0, 0, &args);
>   
> -	if (count < 0 || args.args[0] == 0) {
> +	if (count < 0) {
>   		printf("Error: %s: iommus property not found or wrong number of cells\n",
>   		       __func__);
>   		return -EINVAL;
>   	}

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Caleb Connolly Nov. 14, 2024, 6:13 p.m. UTC | #2
On Wed, 13 Nov 2024 06:00:56 +0100, Caleb Connolly wrote:
> It turns out this is a very real stream ID. Who woulda thought?
> 
> Drop the 0 check on the SID, there's no reason for it to be there in the first
> place.
> 
> 

Applied, thanks!

[1/1] iommu: qcom-smmu: allow SID 0
      commit: 2417f56520bf88f97ce791adcf713727d381dae1

Best regards,
diff mbox series

Patch

diff --git a/drivers/iommu/qcom-hyp-smmu.c b/drivers/iommu/qcom-hyp-smmu.c
index 1b5a09bb7b39..7e07487ad384 100644
--- a/drivers/iommu/qcom-hyp-smmu.c
+++ b/drivers/iommu/qcom-hyp-smmu.c
@@ -133,9 +133,9 @@  static int get_stream_id(struct udevice *dev)
 	struct ofnode_phandle_args args;
 	int count = ofnode_parse_phandle_with_args(node, "iommus",
 						   "#iommu-cells", 0, 0, &args);
 
-	if (count < 0 || args.args[0] == 0) {
+	if (count < 0) {
 		printf("Error: %s: iommus property not found or wrong number of cells\n",
 		       __func__);
 		return -EINVAL;
 	}