From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH] ethdev: replace rte_memcpy with assignment
Date: Tue, 29 Sep 2026 08:57:00 -0700 [thread overview]
Message-ID: <20260929155701.877309-1-stephen@networkplumber.org> (raw)
Can use structure assignment instead of rte_memcpy here.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/ethdev/rte_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 7c57a9bb8f..6f5a957d00 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -16,7 +16,6 @@
#include <rte_log.h>
#include <rte_interrupts.h>
#include <rte_kvargs.h>
-#include <rte_memcpy.h>
#include <rte_common.h>
#include <rte_mempool.h>
#include <rte_malloc.h>
@@ -631,7 +630,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
rte_spinlock_lock(rte_mcfg_ethdev_get_lock());
if (eth_dev_shared_data_prepare() != NULL) {
- rte_memcpy(owner, ðdev->data->owner, sizeof(*owner));
+ *owner = ethdev->data->owner;
ret = 0;
} else {
ret = -ENOMEM;
--
2.53.0
next reply other threads:[~2026-09-29 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 15:57 Stephen Hemminger [this message]
2026-10-01 8:14 ` [PATCH] ethdev: replace rte_memcpy with assignment Andrew Rybchenko
2026-10-01 18:32 ` Stephen Hemminger
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=20260929155701.877309-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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