From patchwork Thu Sep 24 16:35:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 7258081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 834C79F30C for ; Thu, 24 Sep 2015 16:35:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 027382055D for ; Thu, 24 Sep 2015 16:35:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5CD4920414 for ; Thu, 24 Sep 2015 16:35:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 761476EF05; Thu, 24 Sep 2015 09:35:52 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8CAC17A0FF for ; Thu, 24 Sep 2015 09:35:50 -0700 (PDT) Received: by pacex6 with SMTP id ex6so77514395pac.0 for ; Thu, 24 Sep 2015 09:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ekXLA3j0dlxj7BWfVDk1Ka9tIteHK4ChSiGYUea9Ujo=; b=0Wq7ngHtQSCi7HEdCrhUx+tlfccZ5dE10VWaz1tQiqgB7mESiag/1JZ6OhBrQkKHYI uSMSAXF6JSoYwYQjvrYOCZ5Om4gDLsi4xolpQAWFaMiWRUgnRmqcbO2yMb4Euk4ouYoJ edCLYXKvKqBU1xQ69viIa832xcUtnYSI6rtoaMmfc/XBV/XsY7MSjHR5GKhY/27mgn/x MwEdYthxb+VC0+1TrQ1wL52Esy5bcvxvwzCYS7tK3/Yl+52BPCqA8AR4Gex1u/u3IKgh VxOCaJQy37e4P9DJn0tjnq7okaY/OLXXf2Vv7a81K4kMKhVEimpxh0s13I5843Wb5sD9 z69w== X-Received: by 10.67.4.9 with SMTP id ca9mr755463pad.90.1443112550190; Thu, 24 Sep 2015 09:35:50 -0700 (PDT) Received: from localhost (port-5631.pppoe.wtnet.de. [84.46.22.21]) by smtp.gmail.com with ESMTPSA id gv1sm14520943pbc.38.2015.09.24.09.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2015 09:35:49 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/16] drm/imx: Make pipe number unsigned Date: Thu, 24 Sep 2015 18:35:25 +0200 Message-Id: <1443112538-9616-3-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1443112538-9616-1-git-send-email-thierry.reding@gmail.com> References: <1443112538-9616-1-git-send-email-thierry.reding@gmail.com> 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 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 74f505b0dd02..9ff1b780f453 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -39,20 +39,20 @@ 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; }; static int legacyfb_depth = 16; module_param(legacyfb_depth, int, 0444); -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 28e776d8d9d2..eebf0e2fefd0 100644 --- a/drivers/gpu/drm/imx/imx-drm.h +++ b/drivers/gpu/drm/imx/imx-drm.h @@ -12,7 +12,7 @@ struct drm_framebuffer; 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);