linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: a.motakis@virtualopensystems.com (Antonios Motakis)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] iommu/exynos: Follow kernel coding style for __sysmmu_enable return type
Date: Thu, 25 Jul 2013 17:35:00 +0200	[thread overview]
Message-ID: <1374766502-14823-2-git-send-email-a.motakis@virtualopensystems.com> (raw)
In-Reply-To: <1374766502-14823-1-git-send-email-a.motakis@virtualopensystems.com>

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;
 
 		dev_dbg(data->sysmmu, "already enabled\n");
 	}
-- 
1.8.1.2

  reply	other threads:[~2013-07-25 15:35 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 ` Antonios Motakis [this message]
2013-07-26 10:46   ` [PATCH 2/2] iommu/exynos: Follow kernel coding style for __sysmmu_enable return type Cho KyongHo
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=1374766502-14823-2-git-send-email-a.motakis@virtualopensystems.com \
    --to=a.motakis@virtualopensystems.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).