[PATCH 19/32] net/dpaa2: replace memcpy with assignment
Hemant Agrawal
hemant.agrawal at oss.nxp.com
Mon Feb 10 11:39:35 CET 2025
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
On 09-02-2025 01:52, Stephen Hemminger wrote:
> Prefer structure assignment over memcpy.
> Found by cocci/struct_assign.cocci
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> drivers/net/dpaa2/dpaa2_mux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
> index 2f124313fa..3f259cd16f 100644
> --- a/drivers/net/dpaa2/dpaa2_mux.c
> +++ b/drivers/net/dpaa2/dpaa2_mux.c
> @@ -293,7 +293,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
> ret);
> goto creation_error;
> }
> - rte_memcpy(&s_kg_cfg, &kg_cfg, sizeof(struct dpkg_profile_cfg));
> + s_kg_cfg = kg_cfg;
> } else {
> if (memcmp(&s_kg_cfg, &kg_cfg,
> sizeof(struct dpkg_profile_cfg))) {
More information about the dev
mailing list