From patchwork Fri May 25 15:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10427885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C92B6025B for ; Fri, 25 May 2018 15:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 174D628A38 for ; Fri, 25 May 2018 15:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C28B28CE1; Fri, 25 May 2018 15:57:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9914B28A38 for ; Fri, 25 May 2018 15:57:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F6286E96F; Fri, 25 May 2018 15:57:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 431 seconds by postgrey-1.36 at gabe; Fri, 25 May 2018 15:57:52 UTC Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 877286E96F for ; Fri, 25 May 2018 15:57:52 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LzJj7-1gQfMt3d5t-014UxT; Fri, 25 May 2018 17:52:15 +0200 From: Arnd Bergmann To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie Subject: [PATCH 6/8] drm/exynos: fix scaler_task_done return type Date: Fri, 25 May 2018 17:50:13 +0200 Message-Id: <20180525155030.3667352-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180525155030.3667352-1-arnd@arndb.de> References: <20180525155030.3667352-1-arnd@arndb.de> X-Provags-ID: V03:K1:IeYDxoepEF3K07loDeAEQjFUqNru020qvDEONZYRpd19ZlaZutS rb9//WJwk8g2uox3LQpnEX8BRpy3hHbs9FxGsOVTCiSpTC33PzsggztvP3I4gIqYVUXQli/ uZHNxYxaoU01Agb5GnZ5vvrmzqGJs4DymfIwRJh9QcdS+fY1y5RPKnepu7Lfl7GkCRrjd5I 4TW84NHyhbKUjHOfcatWA== X-UI-Out-Filterresults: notjunk:1; V01:K0:uwCnHK0Xw/w=:yp4q94XWvleAqKH7gz0/TS llwY0wsJujYjuvSHMbndnrnhXwhhgE7epcCosrQ7vsVwSoo0/gmffvLYL5Y5urpB6a4065xMe j1J3lnG9tk2oRwZOyQtHct6GKuyTTbwQ+A2xBMNGihcCrtoS/z1LM6f/ZingrOgZyMG07IWYB ZIatx18ALeha4uMdiyr7qKRShNH3cbaoVhs5zmsvH64FShnNQPVGQL9ZLzqlv2hVCstXVg+1/ 2mMntULpsQFZ/xPaEJtYuK2KfendjjTcxNhH0iO4bUAIRqCmkhSmvy0WWLD1OEtGeMJrCCgv7 VhcQLWJPAGnCuiD0Bw2T1antn9ktXIgCJ7Dw5IH35QnisxqqcF6VkMKwuUdP1EJ5FAWe7ggxQ sBMBJ/DOEW3BOSoq8WmbzC6AX/Jhb46w7up1fJdoHMKcp+oFCb6BjH+HbiaSvXmFFUsnE0fY0 gqFQq/VfXxJDO24eERLamtGcA6qjm8Af+ErxGNVYZETnsbjMkieJZbr0RT/MgWkKX8jJZl2Tk ctjaLMqRTr/jdcD3duSLF07WGJXfcHOcWwweEuU1idAxnLX4R/khQnxsO/hrWZ84+FKw2Ow49 inH8s2i8dSAR/EGiJU13nTYTwPMwFWm5jQn0RJPmJXB5d/pu7P1QONBk1GzoPYY8uVtH470GP aLAxaEZ72WtBj9MaglVvZRsx8Vc1iC7GuZ7YkXEVMw1bdNkzH7oZ9JQOH6u/Wk8e/dWM= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Kukjin Kim , Krzysztof Kozlowski , Andrzej Pietrasiewicz , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Modern gcc versions warn about returning a ternary operator with an 'int' type in a function returning type 'bool': drivers/gpu/drm/exynos/exynos_drm_scaler.c: In function 'scaler_task_done': drivers/gpu/drm/exynos/exynos_drm_scaler.c:402:47: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context] return val & SCALER_INT_STATUS_FRAME_END ? 0 : -EINVAL; From context, it becomes clear that this should have been 'int', so I'm fixing it, along with parenthesizing the expression to make it clearer what is meant here (I got confused at first, after seeing the warning). Fixes: 01fb9185dc18 ("drm/exynos: Add driver for Exynos Scaler module") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_scaler.c b/drivers/gpu/drm/exynos/exynos_drm_scaler.c index 63b05b7c846a..4ad49d7782cd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c +++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c @@ -397,9 +397,9 @@ static inline u32 scaler_get_int_status(struct scaler_context *scaler) return scaler_read(SCALER_INT_STATUS); } -static inline bool scaler_task_done(u32 val) +static inline int scaler_task_done(u32 val) { - return val & SCALER_INT_STATUS_FRAME_END ? 0 : -EINVAL; + return (val & SCALER_INT_STATUS_FRAME_END) ? 0 : -EINVAL; } static irqreturn_t scaler_irq_handler(int irq, void *arg)