From patchwork Tue Mar 19 14:55:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2301661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 242963FC8A for ; Tue, 19 Mar 2013 15:09:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C381E6539 for ; Tue, 19 Mar 2013 08:09:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C9F5E613F for ; Tue, 19 Mar 2013 07:55:32 -0700 (PDT) Received: from avalon.ideasonboard.com (unknown [91.178.238.129]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9D87B366F8 for ; Tue, 19 Mar 2013 15:55:12 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 14/21] modetest: Remove the struct connector_arg encoder field Date: Tue, 19 Mar 2013 15:55:55 +0100 Message-Id: <1363704962-14077-15-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1363704962-14077-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1363704962-14077-1-git-send-email-laurent.pinchart@ideasonboard.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org The field is no needed, make it a local variable where used. Signed-off-by: Laurent Pinchart --- tests/modetest/modetest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 70fa262..ba025d6 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -637,7 +637,6 @@ struct connector_arg { char format_str[5]; unsigned int fourcc; drmModeModeInfo *mode; - drmModeEncoder *encoder; int crtc; unsigned int fb_id[2], current_fb_id; struct timeval start; @@ -657,6 +656,7 @@ struct plane_arg { static void connector_find_mode(struct device *dev, struct connector_arg *c) { drmModeConnector *connector; + drmModeEncoder *encoder; int i, j; /* First, find the connector & mode */ @@ -690,16 +690,16 @@ static void connector_find_mode(struct device *dev, struct connector_arg *c) /* Now get the encoder */ for (i = 0; i < dev->resources->res->count_encoders; i++) { - c->encoder = dev->resources->encoders[i].encoder; - if (!c->encoder) + encoder = dev->resources->encoders[i].encoder; + if (!encoder) continue; - if (c->encoder->encoder_id == connector->encoder_id) + if (encoder->encoder_id == connector->encoder_id) break; } if (c->crtc == -1) - c->crtc = c->encoder->crtc_id; + c->crtc = encoder->crtc_id; } /* -----------------------------------------------------------------------------