]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: spi-qpic-snand: simplify bad block marker duplication
authorGabor Juhos <j4g8y7@gmail.com>
Fri, 11 Jul 2025 16:32:52 +0000 (18:32 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 23 Jul 2025 12:04:08 +0000 (13:04 +0100)
commit1f590fa4b93dd7c7daaa4e09d8381ac2aab3853c
tree86b7bc404371c235c84a4b01d360ac5fbdef18d3
parent69e536c93242425fc65580b02d3f781a96403660
spi: spi-qpic-snand: simplify bad block marker duplication

Due to the expectations of the SPINAND code, the driver duplicates
the bad block markers during raw OOB reads.

It has been implemented by using two if statements, and due to the
opposite conditions one of conditional codepaths always runs. Since
the effect of both codepaths is the same, remove the if statements
and use a single line solution instead.

Also add a note about why the duplication is required.

No functional changes intended.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://patch.msgid.link/20250711-qpic-snand-simplify-bbm-copy-v1-1-dd2608325f72@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-qpic-snand.c