From: Jason Gunthorpe <jgg@nvidia.com>
To: Yi Liu <yi.l.liu@intel.com>
Cc: iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
Nicolin Chen <nicolinc@nvidia.com>
Subject: Re: [PATCH] iommufd: Organize the mock domain alloc functions closer to Joerg's tree
Date: Tue, 31 Oct 2023 08:30:10 -0300 [thread overview]
Message-ID: <20231031113010.GW3952@nvidia.com> (raw)
In-Reply-To: <10a2d6ca-80a3-423c-9795-2b330fbfb558@intel.com>
On Tue, Oct 31, 2023 at 12:13:50PM +0800, Yi Liu wrote:
> > @@ -264,16 +260,11 @@ __mock_domain_alloc_nested(struct mock_iommu_domain *mock_parent,
> > static struct iommu_domain *mock_domain_alloc(unsigned int iommu_domain_type)
> > {
> > - struct iommu_domain *domain;
> > -
> > if (iommu_domain_type == IOMMU_DOMAIN_BLOCKED)
> > return &mock_blocking_domain;
> > - if (iommu_domain_type != IOMMU_DOMAIN_UNMANAGED)
> > - return NULL;
> > - domain = __mock_domain_alloc_paging(iommu_domain_type, false);
> > - if (IS_ERR(domain))
> > - domain = NULL;
> > - return domain;
> > + if (iommu_domain_type == IOMMU_DOMAIN_UNMANAGED)
> > + return mock_domain_alloc_paging(NULL);
> > + return NULL;
>
> a nit, will success oriented better suit here? if otherwise looks good to me.
The merge deletes this function..
Thanks,
Jason
prev parent reply other threads:[~2023-10-31 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 22:53 [PATCH] iommufd: Organize the mock domain alloc functions closer to Joerg's tree Jason Gunthorpe
2023-10-31 0:26 ` Nicolin Chen
2023-10-31 2:14 ` Tian, Kevin
2023-10-31 4:13 ` Yi Liu
2023-10-31 11:30 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231031113010.GW3952@nvidia.com \
--to=jgg@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=kevin.tian@intel.com \
--cc=nicolinc@nvidia.com \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox