mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: oss-tools@pengutronix.de
Subject: [OSS-Tools] [PATCH platsch 1/5] avoid unnecessary indirections
Date: Wed, 21 Jun 2023 16:17:50 +0200	[thread overview]
Message-ID: <20230621141754.3143325-1-u.oelmann@pengutronix.de> (raw)

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
 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




             reply	other threads:[~2023-06-21 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21 14:17 Ulrich Ölmann [this message]
2023-06-21 14:17 ` [OSS-Tools] [PATCH platsch 2/5] use pointers to immutable strings for cmdline options Ulrich Ölmann
2023-06-21 14:17 ` [OSS-Tools] [PATCH platsch 3/5] allow directory/basename selection via environment Ulrich Ölmann
2023-06-21 14:17 ` [OSS-Tools] [PATCH platsch 4/5] README.rst: fix typos Ulrich Ölmann
2023-06-21 14:17 ` [OSS-Tools] [PATCH platsch 5/5] README.rst: fix documented purpose of commandline arguments Ulrich Ölmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230621141754.3143325-1-u.oelmann@pengutronix.de \
    --to=u.oelmann@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox