Messages in this thread | | | Subject | Re: [PATCH 2/2 v2] iommu: use the __iommu_attach_device() directly for deferred attach | From | lijiang <> | Date | Thu, 21 Jan 2021 20:57:05 +0800 |
| |
Hi, Christoph
在 2021年01月19日 23:29, Christoph Hellwig 写道: >> +int iommu_do_deferred_attach(struct device *dev, >> + struct iommu_domain *domain) > > I'd remove the "do_" from the name, it doesn't really add any value. > OK.
>> +{ >> + const struct iommu_ops *ops = domain->ops; >> + >> + if (unlikely(ops->is_attach_deferred && >> + ops->is_attach_deferred(domain, dev))) >> + return __iommu_attach_device(domain, dev); >> + >> + return 0; > > Now that everyting is under the static key we don't really need to > bother with the unlikely micro optimization, do we? > Good understanding. I can remove it, otherwise it should use the likely().
>> +extern int iommu_do_deferred_attach(struct device *dev, >> + struct iommu_domain *domain); > > No need for the extern. > Sounds good. I will remove the 'extern' when I post again.
Thanks. Lianbo
| |