From patchwork Tue Dec 15 11:20:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 7853621 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07704BEEE1 for ; Tue, 15 Dec 2015 11:21:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A5E22035E for ; Tue, 15 Dec 2015 11:21:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 08001203A9 for ; Tue, 15 Dec 2015 11:21:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FBE36E6CA; Tue, 15 Dec 2015 03:21:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by gabe.freedesktop.org (Postfix) with ESMTP id 852EA6E04F for ; Tue, 15 Dec 2015 03:21:20 -0800 (PST) Received: by mail.free-electrons.com (Postfix, from userid 110) id C4B11448; Tue, 15 Dec 2015 12:21:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost.localdomain (AToulouse-657-1-9-66.w83-193.abo.wanadoo.fr [83.193.70.66]) by mail.free-electrons.com (Postfix) with ESMTPSA id 7F3E243E; Tue, 15 Dec 2015 12:21:18 +0100 (CET) From: Boris Brezillon To: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org Subject: [RESEND PATCH 03/28] drm/imx: Make pipe number unsigned Date: Tue, 15 Dec 2015 12:20:51 +0100 Message-Id: <1450178476-26284-4-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450178476-26284-1-git-send-email-boris.brezillon@free-electrons.com> References: <1450178476-26284-1-git-send-email-boris.brezillon@free-electrons.com> Cc: Thierry Reding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding There's no reason whatsoever why this should ever be negative. The same goes for the number of pipes added to the DRM device. Cc: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Thierry Reding --- drivers/gpu/drm/imx/imx-drm-core.c | 6 +++--- drivers/gpu/drm/imx/imx-drm.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 09e20ea..9211473 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -39,13 +39,13 @@ struct imx_drm_component { struct imx_drm_device { struct drm_device *drm; struct imx_drm_crtc *crtc[MAX_CRTC]; - int pipes; + unsigned int pipes; struct drm_fbdev_cma *fbhelper; }; struct imx_drm_crtc { struct drm_crtc *crtc; - int pipe; + unsigned int pipe; struct imx_drm_crtc_helper_funcs imx_drm_helper_funcs; }; @@ -54,7 +54,7 @@ static int legacyfb_depth = 16; module_param(legacyfb_depth, int, 0444); #endif -int imx_drm_crtc_id(struct imx_drm_crtc *crtc) +unsigned int imx_drm_crtc_id(struct imx_drm_crtc *crtc) { return crtc->pipe; } diff --git a/drivers/gpu/drm/imx/imx-drm.h b/drivers/gpu/drm/imx/imx-drm.h index 83284b4..71cf6d9 100644 --- a/drivers/gpu/drm/imx/imx-drm.h +++ b/drivers/gpu/drm/imx/imx-drm.h @@ -13,7 +13,7 @@ struct drm_plane; struct imx_drm_crtc; struct platform_device; -int imx_drm_crtc_id(struct imx_drm_crtc *crtc); +unsigned int imx_drm_crtc_id(struct imx_drm_crtc *crtc); struct imx_drm_crtc_helper_funcs { int (*enable_vblank)(struct drm_crtc *crtc);