From: Dmitry Osipenko <digetx@gmail.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>,
thierry.reding@gmail.com, joro@8bytes.org
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux-foundation.org, jonathanh@nvidia.com
Subject: Re: [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()
Date: Sat, 3 Oct 2020 17:06:42 +0300 [thread overview]
Message-ID: <4a5a5b1c-080a-327a-1e2f-dc087948e1a1@gmail.com> (raw)
In-Reply-To: <20201003065947.18671-3-nicoleotsuka@gmail.com>
03.10.2020 09:59, Nicolin Chen пишет:
> static int tegra_smmu_of_xlate(struct device *dev,
> struct of_phandle_args *args)
> {
> + struct platform_device *iommu_pdev = of_find_device_by_node(args->np);
> + struct tegra_mc *mc = platform_get_drvdata(iommu_pdev);
> u32 id = args->args[0];
>
> + put_device(&iommu_pdev->dev);
> +
> + if (!mc || !mc->smmu)
> + return -EPROBE_DEFER;
I'm not very excited by seeing code in the patches that can't be
explained by the patch authors and will appreciate if you could provide
a detailed explanation about why this NULL checking is needed because I
think it is unneeded, especially given that other IOMMU drivers don't
have such check.
I'm asking this question second time now, please don't ignore review
comments next time.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-10-03 14:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-03 6:59 [PATCH v5 0/3] iommu/tegra-smmu: Add PCI support Nicolin Chen
2020-10-03 6:59 ` [PATCH v5 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev Nicolin Chen
2020-10-03 14:14 ` Dmitry Osipenko
2020-10-03 6:59 ` [PATCH v5 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device() Nicolin Chen
2020-10-03 14:05 ` Dmitry Osipenko
2020-10-04 22:04 ` Nicolin Chen
2020-10-03 14:06 ` Dmitry Osipenko [this message]
2020-10-04 21:57 ` Nicolin Chen
2020-10-05 8:41 ` Dmitry Osipenko
2020-10-05 10:56 ` Thierry Reding
2020-10-06 1:14 ` Nicolin Chen
2020-10-03 14:19 ` Dmitry Osipenko
2020-10-03 6:59 ` [PATCH v5 3/3] iommu/tegra-smmu: Add PCI support Nicolin Chen
2020-10-03 14:16 ` Dmitry Osipenko
2020-10-04 22:08 ` Nicolin Chen
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=4a5a5b1c-080a-327a-1e2f-dc087948e1a1@gmail.com \
--to=digetx@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=nicoleotsuka@gmail.com \
--cc=thierry.reding@gmail.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