From: Cho KyongHo <pullip.cho@samsung.com>
To: "'Antonios Motakis'" <a.motakis@virtualopensystems.com>,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org,
linux-samsung-soc@vger.kernel.org
Cc: kvmarm@lists.cs.columbia.edu, "'Joerg Roedel'" <joro@8bytes.org>,
"'Sachin Kamat'" <sachin.kamat@linaro.org>,
"'Varun Sethi'" <Varun.Sethi@freescale.com>,
"'open list'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 2/2] iommu/exynos: Follow kernel coding style for __sysmmu_enable return type
Date: Fri, 26 Jul 2013 19:46:01 +0900 [thread overview]
Message-ID: <003101ce89ed$52317330$f6945990$@samsung.com> (raw)
In-Reply-To: <1374766502-14823-2-git-send-email-a.motakis@virtualopensystems.com>
> -----Original Message-----
> From: Antonios Motakis [mailto:a.motakis@virtualopensystems.com]
> Sent: Friday, July 26, 2013 12:35 AM
>
> On success, the __sysmmu_enable returns 1 instead of 0, which does not
> respect the convention described in Chapter 16 of the Linux kernel coding
> style.
>
> In fact, this return value is propagated all the way up to
> iommu_attach_device() and iommu_attach_device() in drivers/iommu.c,
> which results into inconsistent behavior of the IOMMU API with Exynos
> systems, compared to other IOMMUs.
>
> This patch replaces the return value with 0, which makes the Exynos'
> IOMMU driver behavior consistent with that of other IOMMUs.
>
> Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com>
> ---
> drivers/iommu/exynos-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index c7dd4b5..4ea3abb 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -504,7 +504,7 @@ static int __sysmmu_enable(struct sysmmu_drvdata *data,
>
> dev_dbg(data->sysmmu, "Enabled\n");
> } else {
> - ret = (pgtable == data->pgtable) ? 1 : -EBUSY;
> + ret = (pgtable == data->pgtable) ? 0 : -EBUSY;
>
Ok.
__sysmmu_enable() must return 1 if it is called with the same page table.
I have fixed it exynos_iommu_attach_device() to always return zero on success
in the next patchset which I will post today.
Thank you.
> dev_dbg(data->sysmmu, "already enabled\n");
> }
> --
> 1.8.1.2
next prev parent reply other threads:[~2013-07-26 10:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 15:34 [PATCHv2 1/2] iommu/exynos: add devices attached to the System MMU to an IOMMU group Antonios Motakis
2013-07-25 15:35 ` [PATCH 2/2] iommu/exynos: Follow kernel coding style for __sysmmu_enable return type Antonios Motakis
2013-07-26 10:46 ` Cho KyongHo [this message]
2013-08-14 13:15 ` 'Joerg Roedel'
2013-08-16 11:21 ` Cho KyongHo
2013-08-18 13:33 ` Antonios Motakis
2013-07-26 4:48 ` [PATCHv2 1/2] iommu/exynos: add devices attached to the System MMU to an IOMMU group Sachin Kamat
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='003101ce89ed$52317330$f6945990$@samsung.com' \
--to=pullip.cho@samsung.com \
--cc=Varun.Sethi@freescale.com \
--cc=a.motakis@virtualopensystems.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
/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
Powered by JetHome