From patchwork Fri Jun 14 21:34:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2725091 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E0E809F8E4 for ; Fri, 14 Jun 2013 21:54:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 201662024F for ; Fri, 14 Jun 2013 21:54:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 597492024E for ; Fri, 14 Jun 2013 21:54:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 64D0FE5EF1 for ; Fri, 14 Jun 2013 14:54:58 -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 8576CE5EF1 for ; Fri, 14 Jun 2013 14:35:18 -0700 (PDT) Received: from avalon.ideasonboard.com (unknown [91.177.128.27]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 417B735A6E; Fri, 14 Jun 2013 23:35:09 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v6 14/23] modetest: Remove the struct connector_arg encoder field Date: Fri, 14 Jun 2013 23:34:48 +0200 Message-Id: <1371245697-29504-15-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1371245697-29504-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1371245697-29504-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 X-Spam-Status: No, score=-4.5 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 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 a1a683f..2c3e093 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -638,7 +638,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; @@ -659,6 +658,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 */ @@ -692,16 +692,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; } /* -----------------------------------------------------------------------------