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 4D2B845CFC; Thu, 14 Nov 2024 02:55:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA95B427E3; Thu, 14 Nov 2024 02:54:27 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id A4EA842791 for ; Thu, 14 Nov 2024 02:54:23 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2e31af47681so106398a91.2 for ; Wed, 13 Nov 2024 17:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731549263; x=1732154063; 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=wIoWGY162PxQiRdoJSD58vBedGxGtTUiJ61NWmEHJgI=; b=ud9QRAoXh7B9nbLuDxBWo0JHb0Coh6iHSnvrATsECwhIOdUj4lXPfZwW2pt47t33ZG TFPWpTS4epxPvC+4BUpNTuKejbbcgx7qtOoEL4tyNkGbVlHznFM2ab3p2y9sNYADUO88 byYG7We27IVjmq+t6fb2c/wLRKkYxhuRbSEzjwXMkXxi9Hu9YT1c9bYxpqrskvzSl9k0 iib4/8SxQ36z8uO9K6asubmaDgTy691sCB6FRmtFu1b903O8x7xL88V9ls4N2wmCZfMV aENyLqhiwKjPt6ScCgVQtzvbgFKVv25MkjxYlcECNLrWJJ4yqONpkL9vE8IfJQmNuSXo 4vxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731549263; x=1732154063; 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=wIoWGY162PxQiRdoJSD58vBedGxGtTUiJ61NWmEHJgI=; b=OUZQOkQm82bR3gmBCyU5ZcqRWFLS9YmUsFeWUwFlXCM+pMkEoQTU0hbsAltm0Nc0+2 9EE9KbbD1LmbMYgsDYkBWBGbXIG8dqpGUU3C4TRTeNJM5ecdVEH50/nDzzlklaHadBSh 2nj2mr3n5vsXftwB6tsUZ0eXsVYXs0nM1gXaNGMoO1D3SspszxRAbN5O+YlOFvDmX+z7 8TntXK3mhZxAb9kOHwgBDmf5lxQic7YlyBzenSwZEZoW6b2WSotZD9OS9zAvryV5kD82 9ZLZ8T+S73paJjRece2Mvjk42TIDUyYQaDwTlNNuMIKxyBNw5ktLZJYbbuuupY+NfFRz qStg== X-Gm-Message-State: AOJu0YyRvf3hq7cAIFv/bwIft3ODAX7PHwbzJQp2bHuDOLQfQ3+TgH3v AhTRjC+TKAuvIG25sQJMcODDPsX4znSfXOtlFJbjXiwXQ7FW0AoJ34MYhIFPbLqdQsmZrXrcDFT n X-Google-Smtp-Source: AGHT+IGWoRBuAH6d6BvlfED1CXCtaX1iFibgRkAbnJVKV4HtAgX+MbMMb8a9enuQl/KjWQEZL1UX8g== X-Received: by 2002:a17:90b:4c49:b0:2e2:9522:278f with SMTP id 98e67ed59e1d1-2e9f2d793b8mr5570839a91.32.1731549262729; Wed, 13 Nov 2024 17:54:22 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea02496eedsm210050a91.18.2024.11.13.17.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 17:54:22 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ashish Gupta , Fan Zhang Subject: [PATCH v2 7/8] compress/octeontx: remove unnecessary memset Date: Wed, 13 Nov 2024 17:52:21 -0800 Message-ID: <20241114015405.77060-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114015405.77060-1-stephen@networkplumber.org> References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114015405.77060-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 --- 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