From patchwork Mon Mar 7 10:59:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Vlad X-Patchwork-Id: 8518621 Return-Path: X-Original-To: patchwork-intel-gfx@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 899529F7CA for ; Mon, 7 Mar 2016 10:58:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B09DB20125 for ; Mon, 7 Mar 2016 10:58:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C29912010F for ; Mon, 7 Mar 2016 10:58:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D7AE56E338; Mon, 7 Mar 2016 10:58:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id A3B566E338 for ; Mon, 7 Mar 2016 10:58:42 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 07 Mar 2016 02:58:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,550,1449561600"; d="scan'208";a="759461838" Received: from mcvlad-wk.rb.intel.com ([10.237.105.57]) by orsmga003.jf.intel.com with ESMTP; 07 Mar 2016 02:58:40 -0800 From: Marius Vlad To: intel-gfx@lists.freedesktop.org Date: Mon, 7 Mar 2016 12:59:55 +0200 Message-Id: <1457348395-21011-1-git-send-email-marius.c.vlad@intel.com> X-Mailer: git-send-email 2.7.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] tests/kms_setmode: Fix compilation warnings. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 kms_setmode.c:384:30: warning: declaration of ‘drm_fd’ shadows a global declaration [-Wshadow] kms_setmode.c:45:12: note: shadowed declaration is here static int drm_fd; kms_setmode.c:391:38: warning: passing argument 8 of ‘drmModeSetCrtc’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ids, crtc->connector_count, &crtc->mode); Signed-off-by: Marius Vlad --- tests/kms_setmode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 6afe00c..e7a5bee 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -381,23 +381,23 @@ static uint32_t *get_connector_ids(struct crtc_config *crtc) return ids; } -static int test_stealing(int drm_fd, const struct crtc_config *crtc, uint32_t *ids) +static int test_stealing(int fd, struct crtc_config *crtc, uint32_t *ids) { int i, ret = 0; if (!crtc->connector_count) - return drmModeSetCrtc(drm_fd, crtc->crtc_id, + return drmModeSetCrtc(fd, crtc->crtc_id, crtc->fb_info.fb_id, 0, 0, ids, crtc->connector_count, &crtc->mode); for (i = 0; i < crtc->connector_count; ++i) { - ret = drmModeSetCrtc(drm_fd, crtc->crtc_id, + ret = drmModeSetCrtc(fd, crtc->crtc_id, crtc->fb_info.fb_id, 0, 0, &ids[i], 1, &crtc->mode); igt_assert_eq(ret, 0); - ret = drmModeSetCrtc(drm_fd, crtc->crtc_id, + ret = drmModeSetCrtc(fd, crtc->crtc_id, crtc->fb_info.fb_id, 0, 0, ids, crtc->connector_count, &crtc->mode);