From patchwork Thu Jul 25 15:35:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonios Motakis X-Patchwork-Id: 2833457 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 11513C0319 for ; Thu, 25 Jul 2013 15:36:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E277820340 for ; Thu, 25 Jul 2013 15:36:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F04420335 for ; Thu, 25 Jul 2013 15:36:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2NaD-0008Me-Hq; Thu, 25 Jul 2013 15:36:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2Na5-00055H-PU; Thu, 25 Jul 2013 15:35:53 +0000 Received: from mail-we0-f176.google.com ([74.125.82.176]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2NZq-00051f-F1 for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2013 15:35:49 +0000 Received: by mail-we0-f176.google.com with SMTP id q56so805330wes.7 for ; Thu, 25 Jul 2013 08:35:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=dMLm6RV3hh127WkKg/vnoIc9T13lhQB1Y8xchoNIv+Q=; b=KUB4Y0vSuNNEEbNL0SNgqNax7Kldk8OkYzfJemrIc1OimZDOPROly8w+4LHQcTe7Dn D2yy767WJGGz0yJKIsWnyF3lWfoxXjsTsnq1Z/K/9dQjV5CtPtr2JfwQpPbiDq7OC26K lsJjekSSpzMIf0027sZmyjh39oNv5x2wQTPUkNco0BJgUGJ3D8eOyKlOnJJVjoqxwKv7 k6oSp+REc+nyqlL46/JK4rLlFaHqZHw4CtwWq7ek/ycFdCReWj4i1b1nrTcV29ojjlJh dMuIuF31ivDgANstI6t9iueFXxwOlaage/a+RBcFG+cA0ZK6XHOKFrSepnvjEVIlpKYQ AcrQ== X-Received: by 10.194.93.74 with SMTP id cs10mr32123567wjb.9.1374766516738; Thu, 25 Jul 2013 08:35:16 -0700 (PDT) Received: from localhost.localdomain (home.tvelocity.eu. [82.67.68.96]) by mx.google.com with ESMTPSA id mb20sm4548063wic.1.2013.07.25.08.35.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 08:35:15 -0700 (PDT) From: Antonios Motakis To: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.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 Message-Id: <1374766502-14823-2-git-send-email-a.motakis@virtualopensystems.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374766502-14823-1-git-send-email-a.motakis@virtualopensystems.com> References: <1374766502-14823-1-git-send-email-a.motakis@virtualopensystems.com> X-Gm-Message-State: ALoCoQl+UiNYl2JudIVd1twvrHygbmx8VVTf3AkdOSp57lhgwCTrQ3FEXW7owGm24+9FzxQSpZZc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130725_113538_667256_4034CC54 X-CRM114-Status: GOOD ( 11.46 ) X-Spam-Score: -2.6 (--) Cc: Sachin Kamat , Joerg Roedel , open list , Varun Sethi , Antonios Motakis , Cho KyongHo , kvmarm@lists.cs.columbia.edu X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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"); }