diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-08 07:04:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-08 07:04:29 -0500 |
commit | d50ffc585dbec04fb1d219d5e8523fe6055e706f (patch) | |
tree | 08004217b3b5b75d88d9b2ade272515f95cdc27e /include | |
parent | 85758777c2a227fd1541b6dd122a08ab79c347ce (diff) | |
parent | 98ee3fc7ef8395f8b7a379e6608aee91efc66d48 (diff) |
Merge tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd
Pull MTD fixes from Boris Brezillon:
"MTD changes:
- Kill a VLA in sa1100
SPI NOR changes:
- Make sure ->addr_width is restored when SFDP parsing fails
- Propate errors happening in cqspi_direct_read_execute()
NAND changes:
- Fix kernel-doc mismatch
- Fix nanddev_neraseblocks() to return the correct value
- Avoid selection of BCH_CONST_PARAMS when some users require dynamic
BCH settings"
* tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd:
mtd: nand: Fix nanddev_pos_next_page() kernel-doc header
mtd: sa1100: avoid VLA in sa1100_setup_mtd
mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed
mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute()
mtd: nand: Fix nanddev_neraseblocks()
mtd: nand: drop kernel-doc notation for a deleted function parameter
mtd: docg3: don't set conflicting BCH_CONST_PARAMS option
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/nand.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index abe975c87b90..7f53ece2c039 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -324,9 +324,8 @@ static inline unsigned int nanddev_ntargets(const struct nand_device *nand) | |||
324 | */ | 324 | */ |
325 | static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) | 325 | static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) |
326 | { | 326 | { |
327 | return (u64)nand->memorg.luns_per_target * | 327 | return nand->memorg.ntargets * nand->memorg.luns_per_target * |
328 | nand->memorg.eraseblocks_per_lun * | 328 | nand->memorg.eraseblocks_per_lun; |
329 | nand->memorg.pages_per_eraseblock; | ||
330 | } | 329 | } |
331 | 330 | ||
332 | /** | 331 | /** |
@@ -569,7 +568,7 @@ static inline void nanddev_pos_next_eraseblock(struct nand_device *nand, | |||
569 | } | 568 | } |
570 | 569 | ||
571 | /** | 570 | /** |
572 | * nanddev_pos_next_eraseblock() - Move a position to the next page | 571 | * nanddev_pos_next_page() - Move a position to the next page |
573 | * @nand: NAND device | 572 | * @nand: NAND device |
574 | * @pos: the position to update | 573 | * @pos: the position to update |
575 | * | 574 | * |