Re: [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation

From
Rob Herring <robh@kernel.org>
Date
2021-06-18 21:19:12
Reply to
Miquel Raynal, 2021-06-10
On Thu, 10 Jun 2021 16:39:45 +0200, Miquel Raynal wrote:
"PAGESIZE / 512" is the number of ECC chunks.
"ECC_BYTES" is the number of bytes needed to store a single ECC code.
"2" is the space reserved by the bad block marker.

"2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
than the total number of OOB bytes, otherwise it won't fit.

Fix the equation by substituting s/>=/<=/.

Suggested-by: Ryan J. Barnett <redacted>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Rob Herring <robh@kernel.org>
Thread (3 messages) 3 messages, 2 authors, last reply 2021-07-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help