Re: [PATCH v2 3/3] iommu/tegra-smmu: Add PCI support
From: Nicolin Chen
Date: Wed Sep 30 2020 - 01:35:27 EST
Hi Dmitry,
On Wed, Sep 30, 2020 at 08:10:07AM +0300, Dmitry Osipenko wrote:
> 30.09.2020 03:30, Nicolin Chen пишет:
> > - group->group = iommu_group_alloc();
> > + group->group = pci ? pci_device_group(dev) : iommu_group_alloc();
>
> This will be nicer to write as:
>
> if (dev_is_pci(dev))
> group->group = pci_device_group(dev);
> else
> group->group = generic_device_group(dev);
Why is that nicer? I don't feel mine is hard to read at all...