diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-10 03:44:07 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-10 03:44:07 +0300 |
| commit | eef121f407f727a8c34d8284f9b954828d2cb5ce (patch) | |
| tree | 9dd339eab08f77c7419c0646e98a74c99521c728 /drivers/of/of_reserved_mem.c | |
| parent | abb7e2b3f0714b9710b1865d2ba53525a935a7db (diff) | |
| parent | eaddb5725357e9f05ffe5d271630f8197d089da4 (diff) | |
| download | linux-eef121f407f727a8c34d8284f9b954828d2cb5ce.tar.xz | |
Merge tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DT fixes from Rob Herring:
"I think this should be all for 4.4:
- Fix incorrect warning about overlapping memory regions
- Export of_irq_find_parent again which was made static in 4.4, but
has users pending for 4.5.
- Fix of_msi_map_rid declaration location
- Fix re-entrancy for of_fdt_unflatten_tree
- Clean-up of phys_addr_t printks"
* tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of/irq: move of_msi_map_rid declaration to the correct ifdef section
of/irq: Export of_irq_find_parent again
of/fdt: Add mutex protection for calls to __unflatten_device_tree()
of/address: fix typo in comment block of of_translate_one()
of: do not use 0x in front of %pa
of: Fix comparison of reserved memory regions
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
| -rw-r--r-- | drivers/of/of_reserved_mem.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index be77e75c587d..1a3556a9e9ea 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -206,7 +206,13 @@ static int __init __rmem_cmp(const void *a, const void *b) { const struct reserved_mem *ra = a, *rb = b; - return ra->base - rb->base; + if (ra->base < rb->base) + return -1; + + if (ra->base > rb->base) + return 1; + + return 0; } static void __init __rmem_check_for_overlap(void) |
