lkml.org 
[lkml]   [2022]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration
From
On 2022/4/14 20:42, Robin Murphy wrote:
> @@ -1883,27 +1900,12 @@ static int iommu_bus_init(struct bus_type *bus)
> */
> int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
> {
> - int err;
> -
> - if (ops == NULL) {
> - bus->iommu_ops = NULL;
> - return 0;
> - }
> -
> - if (bus->iommu_ops != NULL)
> + if (bus->iommu_ops && ops && bus->iommu_ops != ops)
> return -EBUSY;
>
> bus->iommu_ops = ops;

Do we still need to keep above lines in bus_set_iommu()?

Best regards,
baolu

\
 
 \ /
  Last update: 2022-04-16 02:05    [W:0.480 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site