From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 21 Jun 2023 16:18:27 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qByfF-00FkMe-4s for lore@lore.pengutronix.de; Wed, 21 Jun 2023 16:18:27 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qByf3-0008FB-J7; Wed, 21 Jun 2023 16:18:17 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qByf1-0008EN-5X; Wed, 21 Jun 2023 16:18:15 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qByf0-0093yR-G8; Wed, 21 Jun 2023 16:18:14 +0200 Received: from uol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qByez-00DBj4-SL; Wed, 21 Jun 2023 16:18:13 +0200 From: =?UTF-8?q?Ulrich=20=C3=96lmann?= To: oss-tools@pengutronix.de Date: Wed, 21 Jun 2023 16:17:50 +0200 Message-Id: <20230621141754.3143325-1-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH platsch 1/5] avoid unnecessary indirections X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Ulrich Ölmann --- platsch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platsch.c b/platsch.c index dfa42dc9d544..c75f934935f2 100644 --- a/platsch.c +++ b/platsch.c @@ -398,9 +398,9 @@ static int set_env_connector_mode(drmModeConnector *conn, for (i = 0; i < conn->count_modes; i++) { drmModeModeInfo mode = conn->modes[i]; if (mode.hdisplay == width && mode.vdisplay == height) { - memcpy(&dev->mode, &conn->modes[i], sizeof(dev->mode)); - dev->width = conn->modes[i].hdisplay; - dev->height = conn->modes[i].vdisplay; + memcpy(&dev->mode, &mode, sizeof(dev->mode)); + dev->width = width; + dev->height = height; break; } } -- 2.39.2