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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221006090419.1635-1-wangdeming@inspur.com>
Date:   Thu, 6 Oct 2022 05:04:19 -0400
From:   Deming Wang <wangdeming@...pur.com>
To:     <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>
CC:     <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        Deming Wang <wangdeming@...pur.com>
Subject: [PATCH] mtd: Delete commented printk and add some space for required

Delete commented printk for NFTL_findwriteunit and

NFTL_makefreeblock. Add required space for the variable blockofs

Signed-off-by: Deming Wang <wangdeming@...pur.com>
---
 drivers/mtd/nftlcore.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index 64d319e959b2..e3c17ed4c219 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -486,7 +486,6 @@ static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
 
 		while (EUN <= nftl->lastEUN) {
 			thislen++;
-			//printk("VUC %d reaches len %d with EUN %d\n", chain, thislen, EUN);
 			EUN = nftl->ReplUnitTable[EUN] & 0x7fff;
 			if (thislen > 0xff00) {
 				printk("Endless loop in Virtual Chain %d: Unit %x\n",
@@ -501,7 +500,6 @@ static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
 		}
 
 		if (thislen > ChainLength) {
-			//printk("New longest chain is %d with length %d\n", chain, thislen);
 			ChainLength = thislen;
 			LongestChain = chain;
 		}
@@ -525,7 +523,7 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block)
 	u16 thisVUC = block / (nftl->EraseSize / 512);
 	struct mtd_info *mtd = nftl->mbd.mtd;
 	unsigned int writeEUN;
-	unsigned long blockofs = (block * 512) & (nftl->EraseSize -1);
+	unsigned long blockofs = (block * 512) & (nftl->EraseSize - 1);
 	size_t retlen;
 	int silly, silly2 = 3;
 	struct nftl_oob oob;
@@ -592,10 +590,6 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block)
 			   a chain to make room.
 			*/
 
-			/* First remember the start of this chain */
-			//u16 startEUN = nftl->EUNtable[thisVUC];
-
-			//printk("Write to VirtualUnitChain %d, calling makefreeblock()\n", thisVUC);
 			writeEUN = NFTL_makefreeblock(nftl, BLOCK_NIL);
 
 			if (writeEUN == BLOCK_NIL) {
@@ -618,7 +612,6 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block)
 				printk(KERN_WARNING "Cannot make free space.\n");
 				return BLOCK_NIL;
 			}
-			//printk("Restarting scan\n");
 			continue;
 		}
 
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ