Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Use bool function return values of true/false not 1/0

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>

authored by

Joe Perches and committed by
Michael Ellerman
acdb6685 4cd968ef

+6 -6
+1 -1
arch/powerpc/include/asm/dcr-native.h
··· 31 31 32 32 static inline bool dcr_map_ok_native(dcr_host_native_t host) 33 33 { 34 - return 1; 34 + return true; 35 35 } 36 36 37 37 #define dcr_map_native(dev, dcr_n, dcr_c) \
+2 -2
arch/powerpc/include/asm/dma-mapping.h
··· 191 191 struct dev_archdata *sd = &dev->archdata; 192 192 193 193 if (sd->max_direct_dma_addr && addr + size > sd->max_direct_dma_addr) 194 - return 0; 194 + return false; 195 195 #endif 196 196 197 197 if (!dev->dma_mask) 198 - return 0; 198 + return false; 199 199 200 200 return addr + size - 1 <= *dev->dma_mask; 201 201 }
+2 -2
arch/powerpc/include/asm/kvm_book3s_64.h
··· 335 335 { 336 336 if (key) 337 337 return PP_RWRX <= pp && pp <= PP_RXRX; 338 - return 1; 338 + return true; 339 339 } 340 340 341 341 static inline bool hpte_write_permission(unsigned long pp, unsigned long key) ··· 373 373 unsigned long mask = (pagesize >> PAGE_SHIFT) - 1; 374 374 375 375 if (pagesize <= PAGE_SIZE) 376 - return 1; 376 + return true; 377 377 return !(memslot->base_gfn & mask) && !(memslot->npages & mask); 378 378 } 379 379
+1 -1
arch/powerpc/sysdev/dcr.c
··· 54 54 else if (host.type == DCR_HOST_MMIO) 55 55 return dcr_map_ok_mmio(host.host.mmio); 56 56 else 57 - return 0; 57 + return false; 58 58 } 59 59 EXPORT_SYMBOL_GPL(dcr_map_ok_generic); 60 60