powerpc: Use bool function return values of true/false not 1/0
authorJoe Perches <joe@perches.com>
Mon, 30 Mar 2015 23:46:04 +0000 (16:46 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 31 Mar 2015 03:19:47 +0000 (14:19 +1100)
Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/dcr-native.h
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/sysdev/dcr.c

index 7d2e6235726d14a94190436891ca157c2457d0c1..4efc11dacb9805013944790c6767d9c1d27c5616 100644 (file)
@@ -31,7 +31,7 @@ typedef struct {
 
 static inline bool dcr_map_ok_native(dcr_host_native_t host)
 {
-       return 1;
+       return true;
 }
 
 #define dcr_map_native(dev, dcr_n, dcr_c) \
index 894d538f356783336f6addf6468ab941cafd0d02..9103687b0436360e99a7977392ce55c83ccc851c 100644 (file)
@@ -191,11 +191,11 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
        struct dev_archdata *sd = &dev->archdata;
 
        if (sd->max_direct_dma_addr && addr + size > sd->max_direct_dma_addr)
-               return 0;
+               return false;
 #endif
 
        if (!dev->dma_mask)
-               return 0;
+               return false;
 
        return addr + size - 1 <= *dev->dma_mask;
 }
index 2d81e202bdccb7e2d06b128e727da0fc84c4f125..2a244bf869c01a21ea9e19c3d150a6de7e20faa9 100644 (file)
@@ -335,7 +335,7 @@ static inline bool hpte_read_permission(unsigned long pp, unsigned long key)
 {
        if (key)
                return PP_RWRX <= pp && pp <= PP_RXRX;
-       return 1;
+       return true;
 }
 
 static inline bool hpte_write_permission(unsigned long pp, unsigned long key)
@@ -373,7 +373,7 @@ static inline bool slot_is_aligned(struct kvm_memory_slot *memslot,
        unsigned long mask = (pagesize >> PAGE_SHIFT) - 1;
 
        if (pagesize <= PAGE_SIZE)
-               return 1;
+               return true;
        return !(memslot->base_gfn & mask) && !(memslot->npages & mask);
 }
 
index 2d8a101b6b9edba7bebe70a8b03ebb4e2f0ba7ab..121e26fffd50946e8df457b51c3c088b6c6fa528 100644 (file)
@@ -54,7 +54,7 @@ bool dcr_map_ok_generic(dcr_host_t host)
        else if (host.type == DCR_HOST_MMIO)
                return dcr_map_ok_mmio(host.host.mmio);
        else
-               return 0;
+               return false;
 }
 EXPORT_SYMBOL_GPL(dcr_map_ok_generic);