lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <4bf1a510b8c21297ac3261c2b291b1833dc7ac5c.1657455082.git.christophe.jaillet@wanadoo.fr>
Date:   Sun, 10 Jul 2022 14:13:11 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Boris Brezillon <bbrezillon@...nel.org>,
        Arnaud Ebalard <arno@...isbad.org>,
        Srujana Challa <schalla@...vell.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-crypto@...r.kernel.org
Subject: [PATCH 3/3] crypto: marvell/octeontx: Avoid some useless memory initialization

In cpt_detach_and_disable_cores(), 'bmap' is initialized just a few lines
below, so there is no need to initialize it when it is declared.

In eng_grp_update_masks(), 'tmp_bmap' is zero'ed at each iteration in the
first 'for' loop.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
index 407e1a3ae841..45d1c9902cf5 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
@@ -204,7 +204,7 @@ static int cpt_detach_and_disable_cores(struct otx_cpt_eng_grp_info *eng_grp,
 					void *obj)
 {
 	struct otx_cpt_device *cpt = (struct otx_cpt_device *) obj;
-	struct otx_cpt_bitmap bmap = { {0} };
+	struct otx_cpt_bitmap bmap;
 	int timeout = 10;
 	int i, busy;
 	u64 reg;
@@ -1056,7 +1056,7 @@ static int eng_grp_update_masks(struct device *dev,
 				struct otx_cpt_eng_grp_info *eng_grp)
 {
 	struct otx_cpt_engs_rsvd *engs, *mirrored_engs;
-	struct otx_cpt_bitmap tmp_bmap = { {0} };
+	struct otx_cpt_bitmap tmp_bmap;
 	int i, j, cnt, max_cnt;
 	int bit;
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ