diff options
author | Yaowei Bai <baiyaowei@cmss.chinamobile.com> | 2018-02-06 18:41:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-06 21:32:47 -0500 |
commit | 9825b451f95a74b33c65069106fc5a6bb8e33aa9 (patch) | |
tree | 61b0d797494a2c12303a91baed81dfa6b0ad85ce /kernel/resource.c | |
parent | 77ef80c65ab72e57cfc273b2dd1d48a282b75146 (diff) |
kernel/resource: iomem_is_exclusive can be boolean
Make iomem_is_exclusive return bool due to this particular function only
using either one or zero as its return value.
No functional change.
Link: http://lkml.kernel.org/r/1513266622-15860-5-git-send-email-baiyaowei@cmss.chinamobile.com
Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r-- | kernel/resource.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 54ba6de3757c..a269b9a1e834 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -1563,17 +1563,17 @@ static int strict_iomem_checks; | |||
1563 | 1563 | ||
1564 | /* | 1564 | /* |
1565 | * check if an address is reserved in the iomem resource tree | 1565 | * check if an address is reserved in the iomem resource tree |
1566 | * returns 1 if reserved, 0 if not reserved. | 1566 | * returns true if reserved, false if not reserved. |
1567 | */ | 1567 | */ |
1568 | int iomem_is_exclusive(u64 addr) | 1568 | bool iomem_is_exclusive(u64 addr) |
1569 | { | 1569 | { |
1570 | struct resource *p = &iomem_resource; | 1570 | struct resource *p = &iomem_resource; |
1571 | int err = 0; | 1571 | bool err = false; |
1572 | loff_t l; | 1572 | loff_t l; |
1573 | int size = PAGE_SIZE; | 1573 | int size = PAGE_SIZE; |
1574 | 1574 | ||
1575 | if (!strict_iomem_checks) | 1575 | if (!strict_iomem_checks) |
1576 | return 0; | 1576 | return false; |
1577 | 1577 | ||
1578 | addr = addr & PAGE_MASK; | 1578 | addr = addr & PAGE_MASK; |
1579 | 1579 | ||
@@ -1596,7 +1596,7 @@ int iomem_is_exclusive(u64 addr) | |||
1596 | continue; | 1596 | continue; |
1597 | if (IS_ENABLED(CONFIG_IO_STRICT_DEVMEM) | 1597 | if (IS_ENABLED(CONFIG_IO_STRICT_DEVMEM) |
1598 | || p->flags & IORESOURCE_EXCLUSIVE) { | 1598 | || p->flags & IORESOURCE_EXCLUSIVE) { |
1599 | err = 1; | 1599 | err = true; |
1600 | break; | 1600 | break; |
1601 | } | 1601 | } |
1602 | } | 1602 | } |