From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] lib/intel_bufops: Don't memcpy() simple structs
Date: Thu, 7 Dec 2023 19:11:36 +0200 [thread overview]
Message-ID: <20231207171136.30669-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20231207171136.30669-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Just use a regular assignment when possible instead of
complicating things with memcpy().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/intel_bufops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 46eba3fb43a2..6ceea55caa81 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -1498,7 +1498,7 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
for (int i = 0; i < ARRAY_SIZE(buf_ops_arr); i++) {
if (generation >= buf_ops_arr[i].gen_start &&
generation <= buf_ops_arr[i].gen_end) {
- memcpy(bops, &buf_ops_arr[i], sizeof(*bops));
+ *bops = buf_ops_arr[i];
break;
}
}
--
2.41.0
next prev parent reply other threads:[~2023-12-07 17:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 17:11 [PATCH i-g-t 1/2] tests/kms_async_flip: Speed up the CRC test on Intel hw Ville Syrjala
2023-12-07 17:11 ` Ville Syrjala [this message]
2023-12-07 20:49 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2023-12-07 23:09 ` ✓ CI.xeBAT: " Patchwork
2023-12-08 5:01 ` [PATCH i-g-t 1/2] " Modem, Bhanuprakash
2023-12-08 18:29 ` Ville Syrjälä
2023-12-19 1:00 ` Ville Syrjälä
2023-12-08 6:56 ` ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
2023-12-11 11:09 ` [PATCH i-g-t 1/2] " Karthik B S
2023-12-19 1:02 ` [PATCH i-g-t v2 " Ville Syrjala
2024-01-18 5:27 ` Karthik B S
2024-01-18 5:27 ` Karthik B S
2023-12-19 1:58 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] tests/kms_async_flip: Speed up the CRC test on Intel hw (rev2) Patchwork
2023-12-19 4:56 ` ✓ CI.xeBAT: " Patchwork
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=20231207171136.30669-2-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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