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

- From: Miquel Raynal \<miquel.raynal@bootlin.com\>
- Date: 2021-07-15 23:08:45 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/07/8192909
- Thread: https://ratatoskr.run/linux-devicetree/2021/06/8191931/t.md

```text
On Thu, 2021-06-10 at 14:39:45 UTC, 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>
> Acked-by: Rob Herring <robh@kernel.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.

Miquel
```
