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 49E0F45D07; Thu, 14 Nov 2024 19:45:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F413142EFD; Thu, 14 Nov 2024 19:45:13 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id AA1B042EE3 for ; Thu, 14 Nov 2024 19:45:08 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2e3010478e6so814945a91.1 for ; Thu, 14 Nov 2024 10:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731609908; x=1732214708; 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=M9p73MA10u2esAdzMySWx9j8qOHq1DUDn9r04cUdc3w=; b=evHA/oXHU/R8muB+0VPl5k1hfvt90dldLxF0V1q+w3RqhGq7LAar6nlCfeBSlaGQaj qDKR/AgSWBANjsbBIFLA0Y7IEiPLA3H+lax/eBBp6Bt7NlmnXmG7Jotk0O0SC1QUhtsb T3P7bCvBr7//xzecS5a5xTUjTtVXRnidC1oA6sSSjkFR4mLik9vzadUZIVGTpzMBP0kX JBZ8XHQwHVp+b7A61OFlyuwVpeyCEVHh44geVsSHA2hU5+e8PUGTbSbwj6WnDMEmj9zz LBx4fEVR/6kA9qjSokFnpptmOhA++E4XU/nUqXdvjXkROIQkVBDNnynCxZ/Z/kIOVojk F1cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731609908; x=1732214708; 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=M9p73MA10u2esAdzMySWx9j8qOHq1DUDn9r04cUdc3w=; b=NZLgPfvUJ30S88zCgue+iyxsFpSVybBvGRBQyTloHhoZPG0epI0SdeIs4PSp6bnlc3 /WEyWRx9iksF+I8AeGbQUQGIzYV5mtyQXS5wwLWNG4xvUAnl3urxWqaF4aGaInR5WUvU mOYWTI6LvCvnT76AROlEtMUjlT8jHfQKpXfenznX1stPyZU7OuDgke+3SsLWpZ/geBkt mEsnpb64W+n1sV+/lEcvxHMRFvOGIgNcUY5Flq8vbfrgRJPf7p1LCYJ8y0dUGl9IJEws wxc+OZx4WddsvcCxEliN8+kOyRZJoDmrpzRVqH6miDEzBKMPdSTXSks5efUshABNOGO/ 5QZQ== X-Gm-Message-State: AOJu0YxloQlK3Dst9+6OYgLISWta5mgCASHoKxEBFk/YlUxht9RzHtRh J45S91codzXJF2pZOAbsE9kDoj3id1MlqIl7EoKhoJIXaR9Lq4oUgI3NLb34XEV2f2v53iLOSY+ PJoQ= X-Google-Smtp-Source: AGHT+IFadXDSbnsldI0QzTO8uyseFEPExxUbwBwarIvXfbZG49sqrYo8t4sIzi2puottJkMdXvnLFw== X-Received: by 2002:a17:90b:4f47:b0:2e8:f58e:27c7 with SMTP id 98e67ed59e1d1-2ea06307298mr3578216a91.14.1731609907897; Thu, 14 Nov 2024 10:45:07 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea06ef71a6sm1517611a91.8.2024.11.14.10.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 10:45:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson , Ashish Gupta , Fan Zhang Subject: [PATCH v4 07/12] compress/octeontx: remove unnecessary memset Date: Thu, 14 Nov 2024 10:43:29 -0800 Message-ID: <20241114184452.31854-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114184452.31854-1-stephen@networkplumber.org> References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114184452.31854-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 Calling memset before rte_free not necessary, and could be removed by the compiler. In this case, the data is not security sensitive so the memset can be removed. Some security scanning tools will flag this. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- drivers/compress/octeontx/otx_zip.c | 1 - drivers/compress/octeontx/otx_zip_pmd.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/compress/octeontx/otx_zip.c b/drivers/compress/octeontx/otx_zip.c index 11471dcbb4..331d2d9475 100644 --- a/drivers/compress/octeontx/otx_zip.c +++ b/drivers/compress/octeontx/otx_zip.c @@ -81,7 +81,6 @@ zipvf_q_term(struct zipvf_qp *qp) struct zip_vf *vf = qp->vf; if (cmdq->va != NULL) { - memset(cmdq->va, 0, ZIP_MAX_CMDQ_SIZE); rte_free(cmdq->va); } diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index c8f456b319..74e3e942ad 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -479,8 +479,6 @@ zip_pmd_stream_free(struct rte_compressdev *dev, void *stream) (void *)&(z_stream->bufs[0]), (MAX_BUFS_PER_STREAM * ZIP_BURST_SIZE)); - /* Zero out the whole structure */ - memset(stream, 0, sizeof(struct zip_stream)); rte_free(stream); return 0; -- 2.45.2