From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A49E643BB1; Fri, 1 Mar 2024 00:02:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 591BA43344; Fri, 1 Mar 2024 00:01:03 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 22EF942FFB for ; Fri, 1 Mar 2024 00:00:18 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6e5a50d91b4so884403b3a.2 for ; Thu, 29 Feb 2024 15:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247617; x=1709852417; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vGk46ToImmd8JoOGy/Hu/uL0vYkj3p8E0mw0PS880YU=; b=15++jMReYKAb2OhaCAs8CB000ciyiaXBPU2lk52b77965fo7ZioPgNL/xwtlJCJHf8 /l+XRa2DcAjg6GJuc7UgII17ybwozCWP9zOimV9xhuN8GvA5NPeV/AuMzSt9HMsisFJa Z9R9gUw5OzHiTO1EVA1WZa5Wn/RiybrenJMHZ6f1Udw2TlPojLIGqF8i+0j72bup7eK+ ruZqRXWHKQJSK79ACtSYxpSDsv7UdqSlg8Ro5/RW8Mf3FrPyOfM4nLHfrXupeHZoMYZb qkarQCq07FwCh/CUbi0mfKHP0uDmjmWafQVmc0xW/GpsaUd4wleFnzIiFmHvs0ZQewgp bsuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247617; x=1709852417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vGk46ToImmd8JoOGy/Hu/uL0vYkj3p8E0mw0PS880YU=; b=NZGthy3i0vkTm0hKTTSf/ZHvt8maI8NsnGgBs4knLOH0idX413ec5SrCTQtd8wEalR h9mwXTldmNWhp1Ljoxdw5l8TvjMQBmFOU+Cy5Tzm1wNd1BiN/kunxMK596HSip9TsWbk VaO9hhjRDvaBSlQSq5YBQdTHIiuVG/Xw94HhuWQ2JEN3Dzkr1tpFr6F8ftVBgO0A53Xe a4bXsBKJRnenmud9xuaCtxyNGk9Tx254654uCSVJGZj9snlctf4vKwFnsybepH/vGbt3 wqsclkFauaNMUnAAQAPVKapt6ryCtVSLoOZoPJIk3KraLhyVHADIiSoA5HNuo32fuk/l p0eA== X-Gm-Message-State: AOJu0Yw1ehGLWGbBmFFLjQzpOVjvlycj6+CZYiZf62LwJq5DbFMxQOck +oDKo3lJPwfqbniQ6Ro4pljEFOwLecXHAOseAPQcXgHfuzHiW9ePvlUTVKDQ6BliUxq3lZFnTvg 1 X-Google-Smtp-Source: AGHT+IFtYifjxoPhHRum73/Gd1dIAgouT37j4eMCTkLsPBKV+bTCy+j4aJxHftCBwSjAMT1YK/Ek7g== X-Received: by 2002:a05:6a20:d806:b0:1a1:1f7b:9b08 with SMTP id iv6-20020a056a20d80600b001a11f7b9b08mr4926598pzb.47.1709247617291; Thu, 29 Feb 2024 15:00:17 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l22-20020a17090b079600b0029a8e5355fcsm1965578pjz.53.2024.02.29.15.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:16 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu Subject: [PATCH 22/71] raw/ifpga: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:09 -0800 Message-ID: <20240229225936.483472-23-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/raw/ifpga/afu_pmd_he_hssi.c | 2 +- drivers/raw/ifpga/afu_pmd_he_lpbk.c | 2 +- drivers/raw/ifpga/afu_pmd_he_mem.c | 2 +- drivers/raw/ifpga/afu_pmd_n3000.c | 8 ++++---- drivers/raw/ifpga/ifpga_rawdev.c | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/raw/ifpga/afu_pmd_he_hssi.c b/drivers/raw/ifpga/afu_pmd_he_hssi.c index 859f28dcc1f0..1ff4b3f9d12a 100644 --- a/drivers/raw/ifpga/afu_pmd_he_hssi.c +++ b/drivers/raw/ifpga/afu_pmd_he_hssi.c @@ -314,7 +314,7 @@ static int he_hssi_config(struct afu_rawdev *dev, void *config, if (cfg->port >= NUM_HE_HSSI_PORTS) return -EINVAL; - rte_memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); + memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_he_lpbk.c b/drivers/raw/ifpga/afu_pmd_he_lpbk.c index c7c5cda48c35..69644281774a 100644 --- a/drivers/raw/ifpga/afu_pmd_he_lpbk.c +++ b/drivers/raw/ifpga/afu_pmd_he_lpbk.c @@ -363,7 +363,7 @@ static int he_lpbk_config(struct afu_rawdev *dev, void *config, if ((cfg->end < cfg->begin) || (cfg->end > MAX_CACHE_LINES)) return -EINVAL; - rte_memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); + memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_he_mem.c b/drivers/raw/ifpga/afu_pmd_he_mem.c index a1db533eeb93..2332a33213c1 100644 --- a/drivers/raw/ifpga/afu_pmd_he_mem.c +++ b/drivers/raw/ifpga/afu_pmd_he_mem.c @@ -126,7 +126,7 @@ static int he_mem_tg_config(struct afu_rawdev *dev, void *config, if (config_size != sizeof(struct rte_pmd_afu_he_mem_tg_cfg)) return -EINVAL; - rte_memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg)); + memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg)); return 0; } diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c b/drivers/raw/ifpga/afu_pmd_n3000.c index 67b394126595..9236c0b15371 100644 --- a/drivers/raw/ifpga/afu_pmd_n3000.c +++ b/drivers/raw/ifpga/afu_pmd_n3000.c @@ -1867,8 +1867,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config, if ((cfg->nlb_cfg.end < cfg->nlb_cfg.begin) || (cfg->nlb_cfg.end > MAX_CACHE_LINES)) return -EINVAL; - rte_memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, - sizeof(struct rte_pmd_afu_nlb_cfg)); + memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, + sizeof(struct rte_pmd_afu_nlb_cfg)); } else if (cfg->type == RTE_PMD_AFU_N3000_DMA) { if (cfg->dma_cfg.index >= NUM_N3000_DMA) return -EINVAL; @@ -1887,8 +1887,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config, cfg->dma_cfg.length); } } - rte_memcpy(&priv->dma_cfg, &cfg->dma_cfg, - sizeof(struct rte_pmd_afu_dma_cfg)); + memcpy(&priv->dma_cfg, &cfg->dma_cfg, + sizeof(struct rte_pmd_afu_dma_cfg)); } else { IFPGA_RAWDEV_PMD_ERR("Invalid type of N3000 AFU"); return -EINVAL; diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index f89bd3f9e2c3..61b82c781b7d 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -258,7 +258,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev) if (point < 12) return -1; point -= 12; - rte_memcpy(ifpga_dev->parent_bdf, &link[point], 12); + memcpy(ifpga_dev->parent_bdf, &link[point], 12); point = strlen(link1); if (point < 26) @@ -948,10 +948,10 @@ ifpga_rawdev_pr(struct rte_rawdev *dev, if (ret) return ret; - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, - sizeof(u64)); - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8, - sizeof(u64)); + memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, + sizeof(u64)); + memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8, + sizeof(u64)); IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx\n", __func__, -- 2.43.0