Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
On Mon, 2015-03-30 at 16:46 -0700, Joe Perches wrote: > Use the normal return values for bool functions Acked-by: Benjamin Herrenschmidt Should we merge it or will you ? Cheers, Ben. > Signed-off-by: Joe Perches > --- > arch/powerpc/include/asm/dcr-native.h| 2 +- > arch/powerpc/include/asm/dma-mapping.h | 4 ++-- > arch/powerpc/include/asm/kvm_book3s_64.h | 4 ++-- > arch/powerpc/sysdev/dcr.c| 2 +- > 4 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/include/asm/dcr-native.h > b/arch/powerpc/include/asm/dcr-native.h > index 7d2e623..4efc11d 100644 > --- a/arch/powerpc/include/asm/dcr-native.h > +++ b/arch/powerpc/include/asm/dcr-native.h > @@ -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) \ > diff --git a/arch/powerpc/include/asm/dma-mapping.h > b/arch/powerpc/include/asm/dma-mapping.h > index 894d538..9103687 100644 > --- a/arch/powerpc/include/asm/dma-mapping.h > +++ b/arch/powerpc/include/asm/dma-mapping.h > @@ -191,11 +191,11 @@ static inline bool dma_capable(struct device *dev, > dma_addr_t addr, size_t size) > struct dev_archdata *sd = >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; > } > diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h > b/arch/powerpc/include/asm/kvm_book3s_64.h > index 2d81e20..2a244bf 100644 > --- a/arch/powerpc/include/asm/kvm_book3s_64.h > +++ b/arch/powerpc/include/asm/kvm_book3s_64.h > @@ -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); > } > > diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c > index 2d8a101..121e26f 100644 > --- a/arch/powerpc/sysdev/dcr.c > +++ b/arch/powerpc/sysdev/dcr.c > @@ -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); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
On Tue, 2015-03-31 at 12:49 +1100, Benjamin Herrenschmidt wrote: > On Mon, 2015-03-30 at 16:46 -0700, Joe Perches wrote: > > Use the normal return values for bool functions > > Acked-by: Benjamin Herrenschmidt > > Should we merge it or will you ? Hey Ben. I don't merge stuff. I just send patches. So, it'll be better if you do it. I'll resend whatever doesn't get picked up in the next couple months on to Andrew Morton. cheers. Joe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
On Tue, 2015-03-31 at 12:49 +1100, Benjamin Herrenschmidt wrote: On Mon, 2015-03-30 at 16:46 -0700, Joe Perches wrote: Use the normal return values for bool functions Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org Should we merge it or will you ? Hey Ben. I don't merge stuff. I just send patches. So, it'll be better if you do it. I'll resend whatever doesn't get picked up in the next couple months on to Andrew Morton. cheers. Joe -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
On Mon, 2015-03-30 at 16:46 -0700, Joe Perches wrote: Use the normal return values for bool functions Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org Should we merge it or will you ? Cheers, Ben. Signed-off-by: Joe Perches j...@perches.com --- arch/powerpc/include/asm/dcr-native.h| 2 +- arch/powerpc/include/asm/dma-mapping.h | 4 ++-- arch/powerpc/include/asm/kvm_book3s_64.h | 4 ++-- arch/powerpc/sysdev/dcr.c| 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/dcr-native.h b/arch/powerpc/include/asm/dcr-native.h index 7d2e623..4efc11d 100644 --- a/arch/powerpc/include/asm/dcr-native.h +++ b/arch/powerpc/include/asm/dcr-native.h @@ -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) \ diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 894d538..9103687 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h @@ -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; } diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index 2d81e20..2a244bf 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h @@ -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); } diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c index 2d8a101..121e26f 100644 --- a/arch/powerpc/sysdev/dcr.c +++ b/arch/powerpc/sysdev/dcr.c @@ -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); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/