* [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'
@ 2019-09-16 20:29 Christophe JAILLET
2019-09-17 6:23 ` Dan Carpenter
2019-10-15 9:51 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2019-09-16 20:29 UTC (permalink / raw)
To: agross, robdclark, joro
Cc: linux-arm-msm, iommu, Christophe JAILLET, kernel-janitors, linux-kernel
'iommu_group_get_for_dev()' never returns NULL, so this test can be
simplified a bit.
This way, the test is consistent with all other calls to
'iommu_group_get_for_dev()'.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/iommu/qcom_iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c
index c31e7bc4ccbe..3d99ec868892 100644
--- a/drivers/iommu/qcom_iommu.c
+++ b/drivers/iommu/qcom_iommu.c
@@ -539,8 +539,8 @@ static int qcom_iommu_add_device(struct device *dev)
}
group = iommu_group_get_for_dev(dev);
- if (IS_ERR_OR_NULL(group))
- return PTR_ERR_OR_ZERO(group);
+ if (IS_ERR(group))
+ return PTR_ERR(group);
iommu_group_put(group);
iommu_device_link(&qcom_iommu->iommu, dev);
--
2.20.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'
2019-09-16 20:29 [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()' Christophe JAILLET
@ 2019-09-17 6:23 ` Dan Carpenter
2019-10-15 9:51 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-09-17 6:23 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-arm-msm, kernel-janitors, iommu, linux-kernel, agross
On Mon, Sep 16, 2019 at 10:29:36PM +0200, Christophe JAILLET wrote:
> 'iommu_group_get_for_dev()' never returns NULL, so this test can be
> simplified a bit.
>
It used to until commit 72dcac633475 ("iommu: Warn once when device_group
callback returns NULL").
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'
2019-09-16 20:29 [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()' Christophe JAILLET
2019-09-17 6:23 ` Dan Carpenter
@ 2019-10-15 9:51 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2019-10-15 9:51 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-arm-msm, kernel-janitors, iommu, linux-kernel, agross
On Mon, Sep 16, 2019 at 10:29:36PM +0200, Christophe JAILLET wrote:
> 'iommu_group_get_for_dev()' never returns NULL, so this test can be
> simplified a bit.
>
> This way, the test is consistent with all other calls to
> 'iommu_group_get_for_dev()'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/iommu/qcom_iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-15 9:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 20:29 [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()' Christophe JAILLET
2019-09-17 6:23 ` Dan Carpenter
2019-10-15 9:51 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).