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 BE58E45CFC; Thu, 14 Nov 2024 03:38:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B55442D9D; Thu, 14 Nov 2024 03:38:01 +0100 (CET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id A0A04427A9 for ; Thu, 14 Nov 2024 03:37:55 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7eae96e6624so64360a12.2 for ; Wed, 13 Nov 2024 18:37:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731551875; x=1732156675; 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=1DOsJOiYup1CcTc10xYomlueXzucKXon2XrpiYcEJ8KGcREXyCZj1lwJFR0DFgmuQ2 drp5Q34N6HKFJjmzsUttYSd+/boMeRMnHI3aacgub+fqyryde/ALaNuXg9fG3g7m7zbe H7SQXVoGUEpJLYalhqZJoQciDlE8JPeXUoLT5QLkdvFUIvoHgveRFUqHzrUkZuNiu+M9 E5ACJNCYIvruChrKsVskKs1JhcT0NpZlRLeXv/9bqkIq612PWhEp+ViZj+UN1WGAPL9D ZOTwz8o5z4SnzYOZUgXF7PTJkX2Bmqd155SrOoEXjmwINf7fkmogHy0EPBkQRTSLvowY +BcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731551875; x=1732156675; 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=lbaBViDeuImz0mXciDMGAYo18y8xjZOlJbxMIJU1YBiS0IMfTqEteTuGV7KeY9O841 gPbX2HzCO7L+bpPiPTIZHcQ5PnoqLesWOMU2p1TxxD5cGgNpKH0LXjNDVMJyzwtSwmsG cPbXmHgwsijTgMS5B9ltiCWsl7TZKKVohy4spKzb9mKNufhKy1ShCBI3IAF08GTdvFZv 0P3V59S7i9AJFux8kkIKynq9Xrk2f6WOAgZqwUH8w4B7QX7Gdw09kx3n/yAQNqpi/d3D UUEt8QFIceyx1cR74dBTzbfz0w/B6UdLccWn+IPcUhVqFJK7ypDVjyVEljiDovU2AfHE dygQ== X-Gm-Message-State: AOJu0YzqTBVJUUdfZBBoQ/FlCXzDACpL+5beeZ2zxYzxVuR5tHlpxaPD /CO0nKbnk9ITvYnLDR1lrhtK5y61oylDRrrMnD6c9JuBLgMfumTzy4rZ0ejJx2UTTUAIDEf1pRu 3 X-Google-Smtp-Source: AGHT+IGWSIY4yx405h2WtuNzMT1Kv8lthp9tHPE+gg7IMsnAE7oyQW02OjeOoIGWbaCM61eWrupVjA== X-Received: by 2002:a05:6a21:339b:b0:1dc:154a:b8d8 with SMTP id adf61e73a8af0-1dc22b61288mr32452853637.35.1731551874848; Wed, 13 Nov 2024 18:37:54 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7246a5d2bb5sm150976b3a.29.2024.11.13.18.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 18:37:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ashish Gupta , Fan Zhang Subject: [PATCH v3 07/11] compress/octeontx: remove unnecessary memset Date: Wed, 13 Nov 2024 18:35:56 -0800 Message-ID: <20241114023738.141821-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114023738.141821-1-stephen@networkplumber.org> References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114023738.141821-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