summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2016.07.0v2016.07.0Sascha Hauer2016-07-111-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubifs: check return pointer properlyLucas Stach2016-07-071-4/+4
| | | | | | | | ubifs_iget() returns error codes encoded in the pointer, so the NULL check will never be true. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-bbu-nand-fcb: avoid double free of dbbt_entriesLucas Stach2016-07-071-1/+0
| | | | | | | The error path properly frees them already. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-bbu-nand-fcb: don't drop error return codeLucas Stach2016-07-071-2/+2
| | | | | | | | | bit_to_flip might be negative if any uncorrectable bitflips occured. Use int instead of unsigned type in order to properly propagate the error. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ext4: fix symlink read functionRonald Zachariah2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | From U-Boot commit: | commit 37f23885e4905ff500a8524328aa3084ac11cdb4 | Author: Ronald Zachariah <rozachar@cisco.com> | Date: Thu Apr 28 07:08:34 2016 +0200 | | fs: ext4: fix symlink read function | | The function ext4fs_read_symlink was unable to handle a symlink | which had target name of exactly 60 characters. | | Signed-off-by: Ronald Zachariah <rozachar@cisco.com> | Signed-off-by: Stefan Roese <sr@denx.de> | Reviewed-by: Stephen Warren <swarren@nvidia.com> | Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* vsprintf: fix handling of strp arg in asprintfEnrico Jorns2016-07-071-2/+1
| | | | | | | | strp argument was ignored but should be forwarded to vasprintf() call in order to make this funktion work as expected. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: bootm: Fix compiler warningSascha Hauer2016-07-051-1/+1
| | | | | | | | fixes: arch/arm/lib/bootm.c:92:137: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: bootm: recalculate decompression spaceStefan Müller-Klieser2016-07-041-3/+15
| | | | | | | | | | | | | | | | According to the kernel documentation it is recommended to place the compressed image between 32 MiB and 128 MiB. The DTB and initrd should be placed above 128 MiB. We will follow the recommendation as long as we have enough RAM. If this is not the case, we fall back to the scheme. This change is required because of the ARM default kernel config changes regarding RODATA layout, which lead to an increased compression factor of the kernel image. This should be regarded as an intermediate solution until there is a mechanism for the kernel image to report the decompressed layout requirements to the bootloader. Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot command: Make verbose/dryrun options work againSascha Hauer2016-06-291-2/+5
| | | | | | | | | | Fixes: bc94fb3 bootm: Initialize bootm_data defaults in single place bootm_data_init_defaults() must be called before filling in the values from the commandline options, otherwise the values will be overwritten in bootm_data_init_defaults(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* eeprom: at24: fix discarding const qualifierSascha Hauer2016-06-281-2/+5
| | | | | | | | fixes: at24.c:434:10: warning: assignment discards 'const' qualifier from pointer target type Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dm9k: Fix buswidth setting for platform data probeSascha Hauer2016-06-281-24/+18
| | | | | | | | | | | priv->buswidth expects IORESOURCE_MEM_* macros which are not identical to the integer byte bus width, so calling dm9000_setup_buswidth() for the platform_data case is wrong. fixes: d818f02 net: dm9k: add device tree support Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported by: 张忠山 <zzs213@126.com>
* mtd: fix mtdraw_erase stub signatureLucas Stach2016-06-241-1/+1
| | | | | | | | | Commit 81737c1d436a (mtd: Fix erasing of devices >4GiB) changed the prototype of the erase function, but fogot to fix up the stub function used when no MTD write support is built in. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* defaultenv-2: select BOOTMLucas Stach2016-06-241-0/+1
| | | | | | | defualtenv-2 selects CMD_BOOT, which in turn needs BOOTM. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: fix USPRG0 defineJ. Tang2016-06-231-1/+1
| | | | | | | | The #define USPRG0 aliases SPRN_USPRG, but it should refer to SPRN_USPRG0. There is no register SPRN_USPRG on PowerPC. Signed-off-by: Jason Tang <tang@jtang.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* aiodev: imx_thermal: depend on MACH_IMX6Lucas Stach2016-06-231-0/+1
| | | | | | | This driver uses private includes from the imx6 architecture. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* aiodev: imx_thermal: remove empty includeLucas Stach2016-06-231-1/+0
| | | | | | | | This file doesn't hold any content any more, so there is no need to include it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: gpmi: Use subpage reads only on suitable NAND chipsSascha Hauer2016-06-221-3/+5
| | | | | | | | | On some NAND chips the driver uses a ECC size that is not dividable by the number of chunks per page which means a single chunk cannot be read. Disable the subpage feature for these NANDs. This is quite unfortunate since the subpage feature really speeds up scanning NAND chips. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start: Fix arm_mem_barebox_image for !CONFIG_RELOCATABLESascha Hauer2016-06-201-2/+6
| | | | | | | | | | | | | | Fixes: 65071bd arm: Clarify memory layout calculation arm_mem_barebox_image() shall return the beginning of the barebox image (and thus the end of the malloc region). For relocatable images we can return a suitable location, but for non relocatable images we do not have a choice: We must return TEXT_BASE. If TEXT_BASE happens to be outside the memory region between membase and endmem we can return the base of the ramoops area. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Markus Pargmann <mpa@pengutronix.de>
* ifup: fix handling when ip env is not givenAlexander Aring2016-06-151-0/+3
| | | | | | | | This patch handles the ip env to "" if no ip env is given. Otherwise we get a NULL pointer derefence. Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubiformat'Sascha Hauer2016-06-141-2/+7
|\
| * ubiformat: Fix formatting devices with unreadable areasSascha Hauer2016-05-201-2/+7
| | | | | | | | | | | | | | | | | | When parts of a Nand device are not readable due to excessive bit flips we should not bail out with an error as this means we can never repair the device by flashing a fresh image using ubiformat. Instead, treat a failed read as a corrupt block and ignore the read failure. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ubiformat: Ignore bitflip errorsSascha Hauer2016-05-201-1/+1
| | | | | | | | | | | | | | | | | | Fixes: 1d88c66 ubiformat: Use mtd-peb API bit flips are no error, when encountering them during scanning of a device just ignore them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubi'Sascha Hauer2016-06-1417-1032/+1175
|\ \
| * | mtd: UBI: Remove ubi_free_fastmapTeresa Remmet2016-05-273-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | Freeing the fastmap is now done by ubi_fastmap_close() from kernel. No need to keep the barebox own fastmap free function. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ubi: Fix out of bounds write in volume update codeRichard Weinberger2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ubi_start_leb_change() allocates too few bytes. ubi_more_leb_change_data() will write up to req->upd_bytes + ubi->min_io_size bytes. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: wl: avoid erasing a PEB which is emptySebastian Siewior2016-05-271-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wear_leveling_worker() currently unconditionally puts a PEB on erase in the error case even it just been taken from the free_list and never used. In case the PEB was never used it can be put back on the free list saving a precious erase cycle. v1…v2: - to_leb_clean -> dst_leb_clean - use the nested option for ensure_wear_leveling() - do_sync_erase() can't go -ENOMEM so we can just go into RO-mode now. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: don't leak e if schedule_erase() failsSebastian Siewior2016-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If __erase_worker() fails to erase the EB and schedule_erase() fails as well to do anything about it then we go RO. But that is not a reason to leak the e argument here. Therefore clean up e. Cc: <stable@vger.kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: fixup error correction in do_sync_erase()Sebastian Siewior2016-05-271-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since fastmap we gained do_sync_erase(). This function can return an error and its error handling isn't obvious. First the memory allocation for struct ubi_work can fail and as such struct ubi_wl_entry is leaked. However if the memory allocation succeeds then the tail function takes care of the struct ubi_wl_entry. A free here could result in a double free. To make the error handling simpler, I split the tail function into one piece which does the work and another which frees the struct ubi_work which is passed as argument. As result do_sync_erase() can keep the struct on stack and we get rid of one error source. Cc: <stable@vger.kernel.org> Fixes: 8199b901a ("UBI: Add fastmap support to the WL sub-system") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/wl.c Fixed conflicts. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: fix use of "VID" vs. "EC" in header self-checkBrian Norris2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a typo, using UBI_EC_HDR_SIZE_CRC (note the "EC") to compute the CRC for the VID header. This shouldn't cause any functional change, as both structures are 64 bytes. Verified with: BUILD_BUG_ON(UBI_VID_HDR_SIZE_CRC != UBI_EC_HDR_SIZE_CRC); Reported here: http://lists.infradead.org/pipermail/linux-mtd/2013-September/048570.html Reported by: Bill Pringlemeir <bpringlemeir@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Fix PEB array typeEzequiel García2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PEB array is an array of __be32, so let's fix the scan_pool() prototype accordingly. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/fastmap.c Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fix debug messageRichard Weinberger2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to use j instead of i. i is the volume id and not the block. Reported-by: Alexander.Block@continental-corporation.com Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fix typo in commentRichard Weinberger2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | While we are here fix a s/beween/between typo. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Simplify expressionRichard Weinberger2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to compute pnum again. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: return ENOSPC if no enough space availableshengyong2016-05-272-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBI: attaching mtd1 to ubi0 UBI: scanning is finished UBI error: init_volumes: not enough PEBs, required 706, available 686 UBI error: ubi_wl_init: no enough physical eraseblocks (-20, need 1) UBI error: ubi_attach_mtd_dev: failed to attach mtd1, error -12 <= NOT ENOMEM UBI error: ubi_init: cannot attach mtd1 If available PEBs are not enough when initializing volumes, return -ENOSPC directly. If available PEBs are not enough when initializing WL, return -ENOSPC instead of -ENOMEM. Cc: stable@vger.kernel.org Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: David Gstir <david@sigma-star.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Validate data_sizeRichard Weinberger2016-05-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that data_size is less than LEB size. Otherwise a handcrafted UBI image is able to trigger an out of bounds memory access in ubi_compare_lebs(). Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: David Gstir <david@sigma-star.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Remove unnecessary `\'shengyong2016-05-272-2/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: add a helper function for updatting on-flash layout volumesshengyong2016-05-271-21/+24
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Do not add vol if it already existsshengyong2016-05-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During fastmap attaching, check if a volume already exists when adding the volume to volume tree. NOTE that the issue cannot happen, only if the on-flash fastmap data is modified. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Init vol->reserved_pebs by assignmentshengyong2016-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `vol' is a newly allocated value by kzalloc. Initialize it by assignment instead of `+='. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Rename variables to make them meaningfulshengyong2016-05-271-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s/fmpl1/fmpl s/fmpl2/fmpl_wl Add "WL" to the error message when wrong WL pool magic number is detected. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/fastmap.c Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Remove unnecessary `\'shengyong2016-05-271-7/+7
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Use max() to get the larger valueshengyong2016-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Fall back to scanning mode after ECC errorRichard Weinberger2016-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we encounter an uncorrectable ECC error while scanning for the fastmap UBI must not fail hard. Instead fall back to scanning mode. Reported-by: Alexander Block <Alexander.Block@continental-corporation.com> Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/attach.c Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Remove is_fm_block()Richard Weinberger2016-05-273-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function was added to fastmap in a very early stage to have paranoid assertions. With the current fastmap implementation this assert will never trigger as fastmap PEBs are not seen by the WL sub-system. Remove it to save us some CPU cycles. Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/fastmap-wl.c Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Introduce may_reserve_for_fm()Richard Weinberger2016-05-273-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | ...and kill another #ifdef. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Introduce ubi_fastmap_init()Richard Weinberger2016-05-272-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | ...and kill another #ifdef in wl.c. :-) Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fastmap: Wire up WL accessor functionsRichard Weinberger2016-05-271-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | Use the new WL accessor functions in fastmap. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Add accessor functions for WL data structuresRichard Weinberger2016-05-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fastmap need access to various WL data structures as fastmap tightly depends on WL. To make the access less invasive add accessor functions. Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/ubi.h Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Move fastmap specific functions out of wl.cRichard Weinberger2016-05-273-411/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fastmap is tightly connected to the WL sub-system, many fastmap-specific functionslive in wl.c. To get rid of most #ifdefs in wl.c move this functions into a new file and include it into wl.c Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/wl.c Reworked this for barebox. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: Fix stale pointers in ubi->lookuptblRichard Weinberger2016-05-271-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some error paths the WL sub-system gives up on a PEB and frees it's ubi_wl_entry struct but does not set the entry in ubi->lookuptbl to NULL. Fastmap can stumble over such a stale pointer as it uses ubi->lookuptbl to find all PEBs. Fix this by introducing a new helper function which free()s a WL entry and removes the reference from the lookup table. Signed-off-by: Richard Weinberger <richard@nod.at> Conflicts: drivers/mtd/ubi/wl.c Fixed minor conflict. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>