LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0
@ 2015-03-30 23:45 Joe Perches
  2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
                   ` (25 more replies)
  0 siblings, 26 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:45 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm, linux-omap, kvm-ppc,
	virtualization, linux-fsdevel, linux-nfs, linux-ide,
	kgdb-bugreport, linux-mm, linux-pm, netdev, alsa-devel, bridge,
	netfilter-devel, coreteam, patches
  Cc: linux-hexagon, linux-ia64, linux-mips, linuxppc-dev, linux-s390,
	sparclinux, linux-scsi, linux-security-module

Joe Perches (25):
  arm: Use bool function return values of true/false not 1/0
  arm64: Use bool function return values of true/false not 1/0
  hexagon: Use bool function return values of true/false not 1/0
  ia64: Use bool function return values of true/false not 1/0
  mips: Use bool function return values of true/false not 1/0
  powerpc: Use bool function return values of true/false not 1/0
  s390: Use bool function return values of true/false not 1/0
  sparc: Use bool function return values of true/false not 1/0
  tile: Use bool function return values of true/false not 1/0
  unicore32: Use bool function return values of true/false not 1/0
  x86: Use bool function return values of true/false not 1/0
  virtio_console: Use bool function return values of true/false not 1/0
  csiostor: Use bool function return values of true/false not 1/0
  dcache: Use bool function return values of true/false not 1/0
  nfsd: nfs4state: Use bool function return values of true/false not 1/0
  include/linux: Use bool function return values of true/false not 1/0
  sound: Use bool function return values of true/false not 1/0
  rcu: tree_plugin: Use bool function return values of true/false not 1/0
  sched: Use bool function return values of true/false not 1/0
  ftrace: Use bool function return values of true/false not 1/0
  slub: Use bool function return values of true/false not 1/0
  bridge: Use bool function return values of true/false not 1/0
  netfilter: Use bool function return values of true/false not 1/0
  security: Use bool function return values of true/false not 1/0
  sound: wm5100-tables: Use bool function return values of true/false not 1/0

 arch/arm/include/asm/dma-mapping.h           |  8 ++--
 arch/arm/include/asm/kvm_emulate.h           |  2 +-
 arch/arm/mach-omap2/powerdomain.c            | 14 +++---
 arch/arm64/include/asm/dma-mapping.h         |  2 +-
 arch/hexagon/include/asm/dma-mapping.h       |  2 +-
 arch/ia64/include/asm/dma-mapping.h          |  2 +-
 arch/mips/include/asm/dma-mapping.h          |  2 +-
 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 +-
 arch/s390/include/asm/dma-mapping.h          |  2 +-
 arch/sparc/mm/init_64.c                      |  8 ++--
 arch/tile/include/asm/dma-mapping.h          |  2 +-
 arch/unicore32/include/asm/dma-mapping.h     |  2 +-
 arch/x86/include/asm/archrandom.h            |  2 +-
 arch/x86/include/asm/dma-mapping.h           |  2 +-
 arch/x86/include/asm/kvm_para.h              |  2 +-
 arch/x86/kvm/cpuid.h                         |  2 +-
 arch/x86/kvm/vmx.c                           | 72 ++++++++++++++--------------
 drivers/char/virtio_console.c                |  2 +-
 drivers/scsi/csiostor/csio_scsi.c            |  4 +-
 fs/dcache.c                                  | 12 ++---
 fs/nfsd/nfs4state.c                          |  2 +-
 include/linux/blkdev.h                       |  2 +-
 include/linux/ide.h                          |  2 +-
 include/linux/kgdb.h                         |  2 +-
 include/linux/mfd/db8500-prcmu.h             |  2 +-
 include/linux/mm.h                           |  2 +-
 include/linux/power_supply.h                 |  8 ++--
 include/linux/ssb/ssb_driver_extif.h         |  2 +-
 include/linux/ssb/ssb_driver_gige.h          | 16 +++----
 include/sound/soc.h                          |  4 +-
 kernel/rcu/tree_plugin.h                     |  4 +-
 kernel/sched/auto_group.h                    |  2 +-
 kernel/sched/completion.c                    | 16 ++++---
 kernel/trace/ftrace.c                        | 10 ++--
 mm/slub.c                                    | 12 ++---
 net/bridge/br_private.h                      |  2 +-
 net/ipv4/netfilter/ipt_ah.c                  |  2 +-
 net/netfilter/ipset/ip_set_hash_ip.c         |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipmark.c     |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipport.c     |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportip.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportnet.c  |  8 ++--
 net/netfilter/ipset/ip_set_hash_net.c        |  8 ++--
 net/netfilter/ipset/ip_set_hash_netiface.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_netport.c    |  8 ++--
 net/netfilter/ipset/ip_set_hash_netportnet.c |  8 ++--
 net/netfilter/xt_connlimit.c                 |  2 +-
 net/netfilter/xt_hashlimit.c                 |  2 +-
 net/netfilter/xt_ipcomp.c                    |  2 +-
 security/apparmor/file.c                     |  8 ++--
 security/apparmor/policy.c                   | 10 ++--
 sound/soc/codecs/wm5100-tables.c             | 12 ++---
 55 files changed, 178 insertions(+), 176 deletions(-)

-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 01/25] arm: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
@ 2015-03-30 23:45 ` Joe Perches
  2015-03-31 15:54   ` Tony Lindgren
  2015-03-31 15:58   ` Paolo Bonzini
  2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
                   ` (24 subsequent siblings)
  25 siblings, 2 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:45 UTC (permalink / raw)
  To: linux-kernel, Christoffer Dall, Marc Zyngier, Gleb Natapov,
	Paolo Bonzini, Tony Lindgren
  Cc: Russell King, linux-arm-kernel, kvmarm, kvm, linux-omap

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/arm/include/asm/dma-mapping.h |  8 ++++----
 arch/arm/include/asm/kvm_emulate.h |  2 +-
 arch/arm/mach-omap2/powerdomain.c  | 14 +++++++-------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index b52101d..166e1e1 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 	u64 limit, mask;
 
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	mask = *dev->dma_mask;
 
 	limit = (mask + 1) & ~mask;
 	if (limit && size > limit)
-		return 0;
+		return false;
 
 	if ((addr | (addr + size - 1)) & ~mask)
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 static inline void dma_mark_clean(void *addr, size_t size) { }
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
index a9c80a2..ad200a0 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, unsigned long hcr)
 
 static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
 {
-	return 1;
+	return true;
 }
 
 static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 78af6d8..897f9fb 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
  */
 bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
 {
-	return (pwrdm && pwrdm->flags & PWRDM_HAS_HDWR_SAR) ? 1 : 0;
+	return pwrdm && (pwrdm->flags & PWRDM_HAS_HDWR_SAR);
 }
 
 int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
@@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
 	if (!pwrdm) {
 		pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
 			 __func__);
-		return 1;
+		return true;
 	}
 
 	if (pwrdm->pwrsts & PWRSTS_OFF)
-		return 1;
+		return true;
 
 	if (pwrdm->pwrsts & PWRSTS_RET) {
 		if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
-			return 1;
+			return true;
 
 		for (i = 0; i < pwrdm->banks; i++)
 			if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
-				return 1;
+				return true;
 	}
 
 	for (i = 0; i < pwrdm->banks; i++)
 		if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
-			return 1;
+			return true;
 
-	return 0;
+	return false;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 02/25] arm64: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
  2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31 15:29   ` Will Deacon
  2015-03-30 23:46 ` [PATCH 03/25] hexagon: " Joe Perches
                   ` (23 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/arm64/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index 6932bb5..9437e3d 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -97,7 +97,7 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	return addr + size - 1 <= *dev->dma_mask;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 03/25] hexagon: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
  2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
  2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 04/25] ia64: " Joe Perches
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Richard Kuo, linux-hexagon

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/hexagon/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h
index 1696542..8d22ba5 100644
--- a/arch/hexagon/include/asm/dma-mapping.h
+++ b/arch/hexagon/include/asm/dma-mapping.h
@@ -56,7 +56,7 @@ extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 	return addr + size - 1 <= *dev->dma_mask;
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 04/25] ia64: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (2 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 03/25] hexagon: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 05/25] mips: " Joe Perches
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tony Luck, Fenghua Yu, linux-ia64

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/ia64/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index cf3ab7e..1b0b192 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -80,7 +80,7 @@ dma_set_mask (struct device *dev, u64 mask)
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	return addr + size - 1 <= *dev->dma_mask;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 05/25] mips: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (3 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 04/25] ia64: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ralf Baechle, linux-mips

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/mips/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 06412aa..fd1b4a1 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -23,7 +23,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	return addr + size <= *dev->dma_mask;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (4 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 05/25] mips: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  1:49   ` Benjamin Herrenschmidt
  2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
                   ` (19 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Alexander Graf, Gleb Natapov, Paolo Bonzini
  Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, kvm-ppc, kvm

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@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);
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 07/25] s390: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (5 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  7:13   ` Heiko Carstens
  2015-03-30 23:46 ` [PATCH 08/25] sparc: " Joe Perches
                   ` (18 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Martin Schwidefsky, Heiko Carstens, linux390, linux-s390

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/s390/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/include/asm/dma-mapping.h b/arch/s390/include/asm/dma-mapping.h
index 709955d..9d39596 100644
--- a/arch/s390/include/asm/dma-mapping.h
+++ b/arch/s390/include/asm/dma-mapping.h
@@ -42,7 +42,7 @@ static inline int dma_supported(struct device *dev, u64 mask)
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 	return addr + size - 1 <= *dev->dma_mask;
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 08/25] sparc: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (6 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 09/25] tile: " Joe Perches
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, sparclinux

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/sparc/mm/init_64.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 4ca0d6b..f7c4832 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1389,25 +1389,25 @@ bool kern_addr_valid(unsigned long addr)
 
 	pgd = pgd_offset_k(addr);
 	if (pgd_none(*pgd))
-		return 0;
+		return false;
 
 	pud = pud_offset(pgd, addr);
 	if (pud_none(*pud))
-		return 0;
+		return false;
 
 	if (pud_large(*pud))
 		return pfn_valid(pud_pfn(*pud));
 
 	pmd = pmd_offset(pud, addr);
 	if (pmd_none(*pmd))
-		return 0;
+		return false;
 
 	if (pmd_large(*pmd))
 		return pfn_valid(pmd_pfn(*pmd));
 
 	pte = pte_offset_kernel(pmd, addr);
 	if (pte_none(*pte))
-		return 0;
+		return false;
 
 	return pfn_valid(pte_pfn(*pte));
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 09/25] tile: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (7 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 08/25] sparc: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 10/25] unicore32: " Joe Perches
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Metcalf

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/tile/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/tile/include/asm/dma-mapping.h b/arch/tile/include/asm/dma-mapping.h
index 1eae359..b150111 100644
--- a/arch/tile/include/asm/dma-mapping.h
+++ b/arch/tile/include/asm/dma-mapping.h
@@ -69,7 +69,7 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	return addr + size - 1 <= *dev->dma_mask;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 10/25] unicore32: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (8 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 09/25] tile: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Guan Xuetao

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/unicore32/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/unicore32/include/asm/dma-mapping.h b/arch/unicore32/include/asm/dma-mapping.h
index 366460a..86f7962 100644
--- a/arch/unicore32/include/asm/dma-mapping.h
+++ b/arch/unicore32/include/asm/dma-mapping.h
@@ -57,7 +57,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 	if (dev && dev->dma_mask)
 		return addr + size - 1 <= *dev->dma_mask;
 
-	return 1;
+	return true;
 }
 
 static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 11/25] x86: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (9 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 10/25] unicore32: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31 16:05   ` Paolo Bonzini
  2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
                   ` (14 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Gleb Natapov, Paolo Bonzini
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, kvm

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/x86/include/asm/archrandom.h  |  2 +-
 arch/x86/include/asm/dma-mapping.h |  2 +-
 arch/x86/include/asm/kvm_para.h    |  2 +-
 arch/x86/kvm/cpuid.h               |  2 +-
 arch/x86/kvm/vmx.c                 | 72 +++++++++++++++++++-------------------
 5 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/arch/x86/include/asm/archrandom.h b/arch/x86/include/asm/archrandom.h
index 69f1366..7abcd71 100644
--- a/arch/x86/include/asm/archrandom.h
+++ b/arch/x86/include/asm/archrandom.h
@@ -126,7 +126,7 @@ static inline int rdrand_long(unsigned long *v)
 
 static inline bool rdseed_long(unsigned long *v)
 {
-	return 0;
+	return false;
 }
 
 #endif  /* CONFIG_ARCH_RANDOM */
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 808dae6..efac032 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -77,7 +77,7 @@ extern phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
 	if (!dev->dma_mask)
-		return 0;
+		return false;
 
 	return addr + size - 1 <= *dev->dma_mask;
 }
diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
index e62cf89..c1adf33 100644
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
@@ -115,7 +115,7 @@ static inline void kvm_spinlock_init(void)
 
 static inline bool kvm_para_available(void)
 {
-	return 0;
+	return false;
 }
 
 static inline unsigned int kvm_arch_para_features(void)
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index 4452eed..2622846 100644
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -26,7 +26,7 @@ static inline bool guest_cpuid_has_xsave(struct kvm_vcpu *vcpu)
 	struct kvm_cpuid_entry2 *best;
 
 	if (!static_cpu_has(X86_FEATURE_XSAVE))
-		return 0;
+		return false;
 
 	best = kvm_find_cpuid_entry(vcpu, 1, 0);
 	return best && (best->ecx & bit(X86_FEATURE_XSAVE));
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index ae4f6d3..ab121db 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -7318,21 +7318,21 @@ static bool nested_vmx_exit_handled_io(struct kvm_vcpu *vcpu,
 		else if (port < 0x10000)
 			bitmap = vmcs12->io_bitmap_b;
 		else
-			return 1;
+			return true;
 		bitmap += (port & 0x7fff) / 8;
 
 		if (last_bitmap != bitmap)
 			if (kvm_read_guest(vcpu->kvm, bitmap, &b, 1))
-				return 1;
+				return true;
 		if (b & (1 << (port & 7)))
-			return 1;
+			return true;
 
 		port++;
 		size--;
 		last_bitmap = bitmap;
 	}
 
-	return 0;
+	return false;
 }
 
 /*
@@ -7348,7 +7348,7 @@ static bool nested_vmx_exit_handled_msr(struct kvm_vcpu *vcpu,
 	gpa_t bitmap;
 
 	if (!nested_cpu_has(vmcs12, CPU_BASED_USE_MSR_BITMAPS))
-		return 1;
+		return true;
 
 	/*
 	 * The MSR_BITMAP page is divided into four 1024-byte bitmaps,
@@ -7367,10 +7367,10 @@ static bool nested_vmx_exit_handled_msr(struct kvm_vcpu *vcpu,
 	if (msr_index < 1024*8) {
 		unsigned char b;
 		if (kvm_read_guest(vcpu->kvm, bitmap + msr_index/8, &b, 1))
-			return 1;
+			return true;
 		return 1 & (b >> (msr_index & 7));
 	} else
-		return 1; /* let L1 handle the wrong parameter */
+		return true; /* let L1 handle the wrong parameter */
 }
 
 /*
@@ -7392,7 +7392,7 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
 		case 0:
 			if (vmcs12->cr0_guest_host_mask &
 			    (val ^ vmcs12->cr0_read_shadow))
-				return 1;
+				return true;
 			break;
 		case 3:
 			if ((vmcs12->cr3_target_count >= 1 &&
@@ -7403,37 +7403,37 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
 					vmcs12->cr3_target_value2 == val) ||
 				(vmcs12->cr3_target_count >= 4 &&
 					vmcs12->cr3_target_value3 == val))
-				return 0;
+				return false;
 			if (nested_cpu_has(vmcs12, CPU_BASED_CR3_LOAD_EXITING))
-				return 1;
+				return true;
 			break;
 		case 4:
 			if (vmcs12->cr4_guest_host_mask &
 			    (vmcs12->cr4_read_shadow ^ val))
-				return 1;
+				return true;
 			break;
 		case 8:
 			if (nested_cpu_has(vmcs12, CPU_BASED_CR8_LOAD_EXITING))
-				return 1;
+				return true;
 			break;
 		}
 		break;
 	case 2: /* clts */
 		if ((vmcs12->cr0_guest_host_mask & X86_CR0_TS) &&
 		    (vmcs12->cr0_read_shadow & X86_CR0_TS))
-			return 1;
+			return true;
 		break;
 	case 1: /* mov from cr */
 		switch (cr) {
 		case 3:
 			if (vmcs12->cpu_based_vm_exec_control &
 			    CPU_BASED_CR3_STORE_EXITING)
-				return 1;
+				return true;
 			break;
 		case 8:
 			if (vmcs12->cpu_based_vm_exec_control &
 			    CPU_BASED_CR8_STORE_EXITING)
-				return 1;
+				return true;
 			break;
 		}
 		break;
@@ -7444,14 +7444,14 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
 		 */
 		if (vmcs12->cr0_guest_host_mask & 0xe &
 		    (val ^ vmcs12->cr0_read_shadow))
-			return 1;
+			return true;
 		if ((vmcs12->cr0_guest_host_mask & 0x1) &&
 		    !(vmcs12->cr0_read_shadow & 0x1) &&
 		    (val & 0x1))
-			return 1;
+			return true;
 		break;
 	}
-	return 0;
+	return false;
 }
 
 /*
@@ -7474,43 +7474,43 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 				KVM_ISA_VMX);
 
 	if (vmx->nested.nested_run_pending)
-		return 0;
+		return false;
 
 	if (unlikely(vmx->fail)) {
 		pr_info_ratelimited("%s failed vm entry %x\n", __func__,
 				    vmcs_read32(VM_INSTRUCTION_ERROR));
-		return 1;
+		return true;
 	}
 
 	switch (exit_reason) {
 	case EXIT_REASON_EXCEPTION_NMI:
 		if (!is_exception(intr_info))
-			return 0;
+			return false;
 		else if (is_page_fault(intr_info))
 			return enable_ept;
 		else if (is_no_device(intr_info) &&
 			 !(vmcs12->guest_cr0 & X86_CR0_TS))
-			return 0;
+			return false;
 		return vmcs12->exception_bitmap &
 				(1u << (intr_info & INTR_INFO_VECTOR_MASK));
 	case EXIT_REASON_EXTERNAL_INTERRUPT:
-		return 0;
+		return false;
 	case EXIT_REASON_TRIPLE_FAULT:
-		return 1;
+		return true;
 	case EXIT_REASON_PENDING_INTERRUPT:
 		return nested_cpu_has(vmcs12, CPU_BASED_VIRTUAL_INTR_PENDING);
 	case EXIT_REASON_NMI_WINDOW:
 		return nested_cpu_has(vmcs12, CPU_BASED_VIRTUAL_NMI_PENDING);
 	case EXIT_REASON_TASK_SWITCH:
-		return 1;
+		return true;
 	case EXIT_REASON_CPUID:
 		if (kvm_register_read(vcpu, VCPU_REGS_RAX) == 0xa)
-			return 0;
-		return 1;
+			return false;
+		return true;
 	case EXIT_REASON_HLT:
 		return nested_cpu_has(vmcs12, CPU_BASED_HLT_EXITING);
 	case EXIT_REASON_INVD:
-		return 1;
+		return true;
 	case EXIT_REASON_INVLPG:
 		return nested_cpu_has(vmcs12, CPU_BASED_INVLPG_EXITING);
 	case EXIT_REASON_RDPMC:
@@ -7527,7 +7527,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 		 * VMX instructions trap unconditionally. This allows L1 to
 		 * emulate them for its L2 guest, i.e., allows 3-level nesting!
 		 */
-		return 1;
+		return true;
 	case EXIT_REASON_CR_ACCESS:
 		return nested_vmx_exit_handled_cr(vcpu, vmcs12);
 	case EXIT_REASON_DR_ACCESS:
@@ -7538,7 +7538,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 	case EXIT_REASON_MSR_WRITE:
 		return nested_vmx_exit_handled_msr(vcpu, vmcs12, exit_reason);
 	case EXIT_REASON_INVALID_STATE:
-		return 1;
+		return true;
 	case EXIT_REASON_MWAIT_INSTRUCTION:
 		return nested_cpu_has(vmcs12, CPU_BASED_MWAIT_EXITING);
 	case EXIT_REASON_MONITOR_INSTRUCTION:
@@ -7548,7 +7548,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 			nested_cpu_has2(vmcs12,
 				SECONDARY_EXEC_PAUSE_LOOP_EXITING);
 	case EXIT_REASON_MCE_DURING_VMENTRY:
-		return 0;
+		return false;
 	case EXIT_REASON_TPR_BELOW_THRESHOLD:
 		return nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW);
 	case EXIT_REASON_APIC_ACCESS:
@@ -7557,7 +7557,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 	case EXIT_REASON_APIC_WRITE:
 	case EXIT_REASON_EOI_INDUCED:
 		/* apic_write and eoi_induced should exit unconditionally. */
-		return 1;
+		return true;
 	case EXIT_REASON_EPT_VIOLATION:
 		/*
 		 * L0 always deals with the EPT violation. If nested EPT is
@@ -7565,7 +7565,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 		 * missing in the guest EPT table (EPT12), the EPT violation
 		 * will be injected with nested_ept_inject_page_fault()
 		 */
-		return 0;
+		return false;
 	case EXIT_REASON_EPT_MISCONFIG:
 		/*
 		 * L2 never uses directly L1's EPT, but rather L0's own EPT
@@ -7573,11 +7573,11 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 		 * (EPT on EPT). So any problems with the structure of the
 		 * table is L0's fault.
 		 */
-		return 0;
+		return false;
 	case EXIT_REASON_WBINVD:
 		return nested_cpu_has2(vmcs12, SECONDARY_EXEC_WBINVD_EXITING);
 	case EXIT_REASON_XSETBV:
-		return 1;
+		return true;
 	case EXIT_REASON_XSAVES: case EXIT_REASON_XRSTORS:
 		/*
 		 * This should never happen, since it is not possible to
@@ -7587,7 +7587,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
 		 */
 		return nested_cpu_has2(vmcs12, SECONDARY_EXEC_XSAVES);
 	default:
-		return 1;
+		return true;
 	}
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 12/25] virtio_console: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (10 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  5:32   ` Amit Shah
  2015-03-30 23:46 ` [PATCH 13/25] csiostor: " Joe Perches
                   ` (13 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Arnd Bergmann, Greg Kroah-Hartman, Amit Shah; +Cc: virtualization

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/char/virtio_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 72d7028..50754d20 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -355,7 +355,7 @@ static inline bool use_multiport(struct ports_device *portdev)
 	 * early_init
 	 */
 	if (!portdev->vdev)
-		return 0;
+		return false;
 	return __virtio_test_bit(portdev->vdev, VIRTIO_CONSOLE_F_MULTIPORT);
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 13/25] csiostor: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (11 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 14/25] dcache: " Joe Perches
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: James E.J. Bottomley, linux-scsi

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/csiostor/csio_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 2c4562d..5754fb6 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -147,9 +147,9 @@ csio_scsi_itnexus_loss_error(uint16_t error)
 	case FW_ERR_RDEV_LOST:
 	case FW_ERR_RDEV_LOGO:
 	case FW_ERR_RDEV_IMPL_LOGO:
-		return 1;
+		return true;
 	}
-	return 0;
+	return false;
 }
 
 /*
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 14/25] dcache: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (12 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 13/25] csiostor: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 15/25] nfsd: nfs4state: " Joe Perches
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Alexander Viro; +Cc: linux-fsdevel

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/dcache.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index d99736a..44b19a4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -629,16 +629,16 @@ static inline bool fast_dput(struct dentry *dentry)
 		if (dentry->d_lockref.count > 1) {
 			dentry->d_lockref.count--;
 			spin_unlock(&dentry->d_lock);
-			return 1;
+			return true;
 		}
-		return 0;
+		return false;
 	}
 
 	/*
 	 * If we weren't the last ref, we're done.
 	 */
 	if (ret)
-		return 1;
+		return true;
 
 	/*
 	 * Careful, careful. The reference count went down
@@ -667,7 +667,7 @@ static inline bool fast_dput(struct dentry *dentry)
 
 	/* Nothing to do? Dropping the reference was all we needed? */
 	if (d_flags == (DCACHE_REFERENCED | DCACHE_LRU_LIST) && !d_unhashed(dentry))
-		return 1;
+		return true;
 
 	/*
 	 * Not the fast normal case? Get the lock. We've already decremented
@@ -684,7 +684,7 @@ static inline bool fast_dput(struct dentry *dentry)
 	 */
 	if (dentry->d_lockref.count) {
 		spin_unlock(&dentry->d_lock);
-		return 1;
+		return true;
 	}
 
 	/*
@@ -693,7 +693,7 @@ static inline bool fast_dput(struct dentry *dentry)
 	 * set it to 1.
 	 */
 	dentry->d_lockref.count = 1;
-	return 0;
+	return false;
 }
 
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 15/25] nfsd: nfs4state: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (13 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 14/25] dcache: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, J. Bruce Fields; +Cc: linux-nfs

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 26e9baa..fbb8dcb 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2603,7 +2603,7 @@ out_no_session:
 static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4_sessionid *sid)
 {
 	if (!session)
-		return 0;
+		return false;
 	return !memcmp(sid, &session->se_sessionid, sizeof(*sid));
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 16/25] include/linux: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (14 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 15/25] nfsd: nfs4state: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  7:41   ` Lee Jones
  2015-04-06 19:39   ` Sebastian Reichel
  2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
                   ` (9 subsequent siblings)
  25 siblings, 2 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, David S. Miller, Jason Wessel, Samuel Ortiz,
	Lee Jones, Sebastian Reichel, Dmitry Eremin-Solenikov,
	David Woodhouse, Michael Buesch
  Cc: linux-ide, kgdb-bugreport, linux-mm, linux-pm, netdev

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/blkdev.h               |  2 +-
 include/linux/ide.h                  |  2 +-
 include/linux/kgdb.h                 |  2 +-
 include/linux/mfd/db8500-prcmu.h     |  2 +-
 include/linux/mm.h                   |  2 +-
 include/linux/power_supply.h         |  8 ++++----
 include/linux/ssb/ssb_driver_extif.h |  2 +-
 include/linux/ssb/ssb_driver_gige.h  | 16 ++++++++--------
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5d93a66..eced869 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1591,7 +1591,7 @@ static inline bool blk_integrity_merge_bio(struct request_queue *rq,
 }
 static inline bool blk_integrity_is_initialized(struct gendisk *g)
 {
-	return 0;
+	return false;
 }
 
 #endif /* CONFIG_BLK_DEV_INTEGRITY */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 93b5ca7..1ba07db 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1411,7 +1411,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *);
 extern void ide_acpi_set_state(ide_hwif_t *hwif, int on);
 #else
 static inline int ide_acpi_init(void) { return 0; }
-static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; }
+static inline bool ide_port_acpi(ide_hwif_t *hwif) { return false; }
 static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; }
 static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; }
 static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; }
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index e465bb1..840f494 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -292,7 +292,7 @@ extern bool kgdb_nmi_poll_knock(void);
 #else
 static inline int kgdb_register_nmi_console(void) { return 0; }
 static inline int kgdb_unregister_nmi_console(void) { return 0; }
-static inline bool kgdb_nmi_poll_knock(void) { return 1; }
+static inline bool kgdb_nmi_poll_knock(void) { return true; }
 #endif
 
 extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 0bd6944..3b06175 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -744,7 +744,7 @@ static inline int db8500_prcmu_load_a9wdog(u8 id, u32 val)
 
 static inline bool db8500_prcmu_is_ac_wake_requested(void)
 {
-	return 0;
+	return false;
 }
 
 static inline int db8500_prcmu_set_arm_opp(u8 opp)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4a3a385..164108c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -819,7 +819,7 @@ static inline int cpu_pid_to_cpupid(int nid, int pid)
 
 static inline bool cpupid_pid_unset(int cpupid)
 {
-	return 1;
+	return true;
 }
 
 static inline void page_cpupid_reset_last(struct page *page)
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 75a1dd8..b0b45c7 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -350,12 +350,12 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp)
 	case POWER_SUPPLY_PROP_CURRENT_NOW:
 	case POWER_SUPPLY_PROP_CURRENT_AVG:
 	case POWER_SUPPLY_PROP_CURRENT_BOOT:
-		return 1;
+		return true;
 	default:
 		break;
 	}
 
-	return 0;
+	return false;
 }
 
 static inline bool power_supply_is_watt_property(enum power_supply_property psp)
@@ -378,12 +378,12 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
 	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
 	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX:
 	case POWER_SUPPLY_PROP_POWER_NOW:
-		return 1;
+		return true;
 	default:
 		break;
 	}
 
-	return 0;
+	return false;
 }
 
 #endif /* __LINUX_POWER_SUPPLY_H__ */
diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
index a410e84..5766b6f 100644
--- a/include/linux/ssb/ssb_driver_extif.h
+++ b/include/linux/ssb/ssb_driver_extif.h
@@ -198,7 +198,7 @@ struct ssb_extif {
 
 static inline bool ssb_extif_available(struct ssb_extif *extif)
 {
-	return 0;
+	return false;
 }
 
 static inline
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 0688472..65f7740 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -75,7 +75,7 @@ static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
 	if (dev)
 		return !!(dev->dev->bus->sprom.boardflags_lo &
 			  SSB_GIGE_BFL_ROBOSWITCH);
-	return 0;
+	return false;
 }
 
 /* Returns whether we can only do one DMA at once. */
@@ -85,7 +85,7 @@ static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
 	if (dev)
 		return ((dev->dev->bus->chip_id == 0x4785) &&
 			(dev->dev->bus->chip_rev < 2));
-	return 0;
+	return false;
 }
 
 /* Returns whether we must flush posted writes. */
@@ -94,7 +94,7 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
 	struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
 	if (dev)
 		return (dev->dev->bus->chip_id == 0x4785);
-	return 0;
+	return false;
 }
 
 /* Get the device MAC address */
@@ -158,7 +158,7 @@ static inline void ssb_gige_exit(void)
 
 static inline bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
 {
-	return 0;
+	return false;
 }
 static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
 {
@@ -166,19 +166,19 @@ static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
 }
 static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev)
 {
-	return 0;
+	return false;
 }
 static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
 {
-	return 0;
+	return false;
 }
 static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
 {
-	return 0;
+	return false;
 }
 static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
 {
-	return 0;
+	return false;
 }
 static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
 {
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 17/25] sound: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (15 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  7:11   ` Mark Brown
  2015-03-30 23:46 ` [PATCH 18/25] rcu: tree_plugin: " Joe Perches
                   ` (8 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/sound/soc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index fcb312b..5ca7ec0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1418,13 +1418,13 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
 static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
 {
 	if (mc->reg == mc->rreg && mc->shift == mc->rshift)
-		return 0;
+		return false;
 	/*
 	 * mc->reg == mc->rreg && mc->shift != mc->rshift, or
 	 * mc->reg != mc->rreg means that the control is
 	 * stereo (bits in one register or in two registers)
 	 */
-	return 1;
+	return true;
 }
 
 static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 18/25] rcu: tree_plugin: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (16 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Paul E. McKenney, Josh Triplett
  Cc: Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 kernel/rcu/tree_plugin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index f2af14d..ea342bb 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -3059,9 +3059,9 @@ static bool rcu_nohz_full_cpu(struct rcu_state *rsp)
 	if (tick_nohz_full_cpu(smp_processor_id()) &&
 	    (!rcu_gp_in_progress(rsp) ||
 	     ULONG_CMP_LT(jiffies, READ_ONCE(rsp->gp_start) + HZ)))
-		return 1;
+		return true;
 #endif /* #ifdef CONFIG_NO_HZ_FULL */
-	return 0;
+	return false;
 }
 
 /*
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (17 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 18/25] rcu: tree_plugin: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  8:53   ` Peter Zijlstra
  2015-04-01  5:17   ` Jason Low
  2015-03-30 23:46 ` [PATCH 20/25] ftrace: " Joe Perches
                   ` (6 subsequent siblings)
  25 siblings, 2 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar, Peter Zijlstra

Use the normal return values for bool functions

Update the other sets of ret in try_wait_for_completion.

Signed-off-by: Joe Perches <joe@perches.com>
---
 kernel/sched/auto_group.h |  2 +-
 kernel/sched/completion.c | 16 +++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/kernel/sched/auto_group.h b/kernel/sched/auto_group.h
index 8bd0471..309b6f2 100644
--- a/kernel/sched/auto_group.h
+++ b/kernel/sched/auto_group.h
@@ -45,7 +45,7 @@ static inline void autogroup_init(struct task_struct *init_task) {  }
 static inline void autogroup_free(struct task_group *tg) { }
 static inline bool task_group_is_autogroup(struct task_group *tg)
 {
-	return 0;
+	return false;
 }
 
 static inline struct task_group *
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index 8d0f35d..cbccaa0 100644
--- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c
@@ -255,8 +255,8 @@ EXPORT_SYMBOL(wait_for_completion_killable_timeout);
  *	try_wait_for_completion - try to decrement a completion without blocking
  *	@x:	completion structure
  *
- *	Return: 0 if a decrement cannot be done without blocking
- *		 1 if a decrement succeeded.
+ *	Return: true if a decrement cannot be done without blocking
+ *		false if a decrement succeeded.
  *
  *	If a completion is being used as a counting completion,
  *	attempt to decrement the counter without blocking. This
@@ -266,7 +266,7 @@ EXPORT_SYMBOL(wait_for_completion_killable_timeout);
 bool try_wait_for_completion(struct completion *x)
 {
 	unsigned long flags;
-	int ret = 1;
+	bool ret;
 
 	/*
 	 * Since x->done will need to be locked only
@@ -275,13 +275,15 @@ bool try_wait_for_completion(struct completion *x)
 	 * return early in the blocking case.
 	 */
 	if (!READ_ONCE(x->done))
-		return 0;
+		return false;
 
 	spin_lock_irqsave(&x->wait.lock, flags);
-	if (!x->done)
-		ret = 0;
-	else
+	if (!x->done) {
+		ret = false;
+	} else {
 		x->done--;
+		ret = true;
+	}
 	spin_unlock_irqrestore(&x->wait.lock, flags);
 	return ret;
 }
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 20/25] ftrace: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (18 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Steven Rostedt, Ingo Molnar

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 kernel/trace/ftrace.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5a2e0b5..650043b 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2755,22 +2755,22 @@ ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec)
 {
 	/* If ops isn't enabled, ignore it */
 	if (!(ops->flags & FTRACE_OPS_FL_ENABLED))
-		return 0;
+		return false;
 
 	/* If ops traces all mods, we already accounted for it */
 	if (ops_traces_mod(ops))
-		return 0;
+		return false;
 
 	/* The function must be in the filter */
 	if (!ftrace_hash_empty(ops->func_hash->filter_hash) &&
 	    !ftrace_lookup_ip(ops->func_hash->filter_hash, rec->ip))
-		return 0;
+		return false;
 
 	/* If in notrace hash, we ignore it too */
 	if (ftrace_lookup_ip(ops->func_hash->notrace_hash, rec->ip))
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 static int referenced_filters(struct dyn_ftrace *rec)
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 21/25] slub: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (19 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 20/25] ftrace: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-04-01  3:29   ` David Rientjes
  2015-03-30 23:46 ` [PATCH 22/25] bridge: " Joe Perches
                   ` (4 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Christoph Lameter, Pekka Enberg, David Rientjes,
	Joonsoo Kim, Andrew Morton
  Cc: linux-mm

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 mm/slub.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 90227ad..520354d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -376,7 +376,7 @@ static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct page *page
 		if (cmpxchg_double(&page->freelist, &page->counters,
 				   freelist_old, counters_old,
 				   freelist_new, counters_new))
-			return 1;
+			return true;
 	} else
 #endif
 	{
@@ -386,7 +386,7 @@ static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct page *page
 			page->freelist = freelist_new;
 			set_page_slub_counters(page, counters_new);
 			slab_unlock(page);
-			return 1;
+			return true;
 		}
 		slab_unlock(page);
 	}
@@ -398,7 +398,7 @@ static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct page *page
 	pr_info("%s %s: cmpxchg double redo ", n, s->name);
 #endif
 
-	return 0;
+	return false;
 }
 
 static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
@@ -412,7 +412,7 @@ static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
 		if (cmpxchg_double(&page->freelist, &page->counters,
 				   freelist_old, counters_old,
 				   freelist_new, counters_new))
-			return 1;
+			return true;
 	} else
 #endif
 	{
@@ -426,7 +426,7 @@ static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
 			set_page_slub_counters(page, counters_new);
 			slab_unlock(page);
 			local_irq_restore(flags);
-			return 1;
+			return true;
 		}
 		slab_unlock(page);
 		local_irq_restore(flags);
@@ -439,7 +439,7 @@ static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
 	pr_info("%s %s: cmpxchg double redo ", n, s->name);
 #endif
 
-	return 0;
+	return false;
 }
 
 #ifdef CONFIG_SLUB_DEBUG
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 22/25] bridge: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (20 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-30 23:46 ` [PATCH 23/25] netfilter: " Joe Perches
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Stephen Hemminger; +Cc: David S. Miller, bridge, netdev

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/bridge/br_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index b46fa0c..5aba35e 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -574,7 +574,7 @@ static inline void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
 }
 static inline bool br_multicast_is_router(struct net_bridge *br)
 {
-	return 0;
+	return false;
 }
 static inline bool br_multicast_querier_exists(struct net_bridge *br,
 					       struct ethhdr *eth)
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 23/25] netfilter: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (21 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 22/25] bridge: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31 16:58   ` Pablo Neira Ayuso
  2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
                   ` (2 subsequent siblings)
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik
  Cc: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, netfilter-devel, coreteam, netdev

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/ipv4/netfilter/ipt_ah.c                  | 2 +-
 net/netfilter/ipset/ip_set_hash_ip.c         | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipmark.c     | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipport.c     | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipportip.c   | 8 ++++----
 net/netfilter/ipset/ip_set_hash_ipportnet.c  | 8 ++++----
 net/netfilter/ipset/ip_set_hash_net.c        | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netiface.c   | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netport.c    | 8 ++++----
 net/netfilter/ipset/ip_set_hash_netportnet.c | 8 ++++----
 net/netfilter/xt_connlimit.c                 | 2 +-
 net/netfilter/xt_hashlimit.c                 | 2 +-
 net/netfilter/xt_ipcomp.c                    | 2 +-
 13 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index 14a2aa8..756c004 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -47,7 +47,7 @@ static bool ah_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		 */
 		pr_debug("Dropping evil AH tinygram.\n");
 		par->hotdrop = true;
-		return 0;
+		return false;
 	}
 
 	return spi_match(ahinfo->spis[0], ahinfo->spis[1],
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index 76959d7..a7d6262 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -61,10 +61,10 @@ hash_ip4_data_list(struct sk_buff *skb, const struct hash_ip4_elem *e)
 {
 	if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -196,10 +196,10 @@ hash_ip6_data_list(struct sk_buff *skb, const struct hash_ip6_elem *e)
 {
 	if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &e->ip.in6))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipmark.c b/net/netfilter/ipset/ip_set_hash_ipmark.c
index 7abf978..327b331 100644
--- a/net/netfilter/ipset/ip_set_hash_ipmark.c
+++ b/net/netfilter/ipset/ip_set_hash_ipmark.c
@@ -63,10 +63,10 @@ hash_ipmark4_data_list(struct sk_buff *skb,
 	if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) ||
 	    nla_put_net32(skb, IPSET_ATTR_MARK, htonl(data->mark)))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -191,10 +191,10 @@ hash_ipmark6_data_list(struct sk_buff *skb,
 	if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &data->ip.in6) ||
 	    nla_put_net32(skb, IPSET_ATTR_MARK, htonl(data->mark)))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c b/net/netfilter/ipset/ip_set_hash_ipport.c
index dcbcceb..b4748e9 100644
--- a/net/netfilter/ipset/ip_set_hash_ipport.c
+++ b/net/netfilter/ipset/ip_set_hash_ipport.c
@@ -69,10 +69,10 @@ hash_ipport4_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -231,10 +231,10 @@ hash_ipport6_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipportip.c b/net/netfilter/ipset/ip_set_hash_ipportip.c
index 7ef93fc..607461b 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportip.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportip.c
@@ -70,10 +70,10 @@ hash_ipportip4_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -240,10 +240,10 @@ hash_ipportip6_data_list(struct sk_buff *skb,
 	    nla_put_net16(skb, IPSET_ATTR_PORT, data->port) ||
 	    nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_ipportnet.c b/net/netfilter/ipset/ip_set_hash_ipportnet.c
index b6012ad..f607ec9 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportnet.c
@@ -114,10 +114,10 @@ hash_ipportnet4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -367,10 +367,10 @@ hash_ipportnet6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c
index 6b3ac10..8bb8cd4 100644
--- a/net/netfilter/ipset/ip_set_hash_net.c
+++ b/net/netfilter/ipset/ip_set_hash_net.c
@@ -95,10 +95,10 @@ hash_net4_data_list(struct sk_buff *skb, const struct hash_net4_elem *data)
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -264,10 +264,10 @@ hash_net6_data_list(struct sk_buff *skb, const struct hash_net6_elem *data)
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c
index 758b002..5a37ede 100644
--- a/net/netfilter/ipset/ip_set_hash_netiface.c
+++ b/net/netfilter/ipset/ip_set_hash_netiface.c
@@ -192,10 +192,10 @@ hash_netiface4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -428,10 +428,10 @@ hash_netiface6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netport.c b/net/netfilter/ipset/ip_set_hash_netport.c
index c0ddb58..65abe45 100644
--- a/net/netfilter/ipset/ip_set_hash_netport.c
+++ b/net/netfilter/ipset/ip_set_hash_netport.c
@@ -110,10 +110,10 @@ hash_netport4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -326,10 +326,10 @@ hash_netport6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index bfaa94c..8c80e84 100644
--- a/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -124,10 +124,10 @@ hash_netportnet4_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -397,10 +397,10 @@ hash_netportnet6_data_list(struct sk_buff *skb,
 	    (flags &&
 	     nla_put_net32(skb, IPSET_ATTR_CADT_FLAGS, htonl(flags))))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 29ba621..548537c 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -92,7 +92,7 @@ static inline bool already_closed(const struct nf_conn *conn)
 		return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT ||
 		       conn->proto.tcp.state == TCP_CONNTRACK_CLOSE;
 	else
-		return 0;
+		return false;
 }
 
 static int
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 1786968..09c3446 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -285,7 +285,7 @@ static int htable_create(struct net *net, struct xt_hashlimit_mtinfo1 *minfo,
 static bool select_all(const struct xt_hashlimit_htable *ht,
 		       const struct dsthash_ent *he)
 {
-	return 1;
+	return true;
 }
 
 static bool select_gc(const struct xt_hashlimit_htable *ht,
diff --git a/net/netfilter/xt_ipcomp.c b/net/netfilter/xt_ipcomp.c
index 89d5310..85b6a9d 100644
--- a/net/netfilter/xt_ipcomp.c
+++ b/net/netfilter/xt_ipcomp.c
@@ -56,7 +56,7 @@ static bool comp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		 */
 		pr_debug("Dropping evil IPComp tinygram.\n");
 		par->hotdrop = true;
-		return 0;
+		return false;
 	}
 
 	return spi_match(compinfo->spis[0], compinfo->spis[1],
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 24/25] security: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (22 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 23/25] netfilter: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-03-31  6:03   ` John Johansen
  2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
  2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel, John Johansen
  Cc: James Morris, Serge E. Hallyn, linux-security-module

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 security/apparmor/file.c   |  8 ++++----
 security/apparmor/policy.c | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index fdaa50c..bd804d4 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -260,8 +260,8 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start,
 static inline bool is_deleted(struct dentry *dentry)
 {
 	if (d_unlinked(dentry) && dentry->d_inode->i_nlink == 0)
-		return 1;
-	return 0;
+		return true;
+	return false;
 }
 
 /**
@@ -322,9 +322,9 @@ static inline bool xindex_is_subset(u32 link, u32 target)
 {
 	if (((link & ~AA_X_UNSAFE) != (target & ~AA_X_UNSAFE)) ||
 	    ((link & AA_X_UNSAFE) && !(target & AA_X_UNSAFE)))
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 /**
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index 705c287..a8e0177 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -137,13 +137,13 @@ static bool policy_init(struct aa_policy *policy, const char *prefix,
 	} else
 		policy->hname = kstrdup(name, GFP_KERNEL);
 	if (!policy->hname)
-		return 0;
+		return false;
 	/* base.name is a substring of fqname */
 	policy->name = (char *)hname_tail(policy->hname);
 	INIT_LIST_HEAD(&policy->list);
 	INIT_LIST_HEAD(&policy->profiles);
 
-	return 1;
+	return true;
 }
 
 /**
@@ -927,15 +927,15 @@ bool aa_may_manage_policy(int op)
 	/* check if loading policy is locked out */
 	if (aa_g_lock_policy) {
 		audit_policy(op, GFP_KERNEL, NULL, "policy_locked", -EACCES);
-		return 0;
+		return false;
 	}
 
 	if (!capable(CAP_MAC_ADMIN)) {
 		audit_policy(op, GFP_KERNEL, NULL, "not policy admin", -EACCES);
-		return 0;
+		return false;
 	}
 
-	return 1;
+	return true;
 }
 
 static struct aa_profile *__list_lookup_parent(struct list_head *lh,
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 25/25] sound: wm5100-tables: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (23 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
@ 2015-03-30 23:46 ` Joe Perches
  2015-04-01 11:54   ` Charles Keepax
  2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
  25 siblings, 1 reply; 71+ messages in thread
From: Joe Perches @ 2015-03-30 23:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	patches, alsa-devel

Use the normal return values for bool functions

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/soc/codecs/wm5100-tables.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm5100-tables.c b/sound/soc/codecs/wm5100-tables.c
index e239f4b..9e987cf 100644
--- a/sound/soc/codecs/wm5100-tables.c
+++ b/sound/soc/codecs/wm5100-tables.c
@@ -30,7 +30,7 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg)
 	case WM5100_OUTPUT_STATUS_2:
 	case WM5100_INPUT_ENABLES_STATUS:
 	case WM5100_MIC_DETECT_3:
-		return 1;
+		return true;
 	default:
 		if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) ||
 		    (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) ||
@@ -41,9 +41,9 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg)
 		    (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) ||
 		    (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) ||
 		    (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511))
-			return 1;
+			return true;
 		else
-			return 0;
+			return false;
 	}
 }
 
@@ -798,7 +798,7 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg)
 	case WM5100_DSP3_CONTROL_28:
 	case WM5100_DSP3_CONTROL_29:
 	case WM5100_DSP3_CONTROL_30:
-		return 1;
+		return true;
 	default:
 		if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) ||
 		    (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) ||
@@ -809,9 +809,9 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg)
 		    (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) ||
 		    (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) ||
 		    (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511))
-			return 1;
+			return true;
 		else
-			return 0;
+			return false;
 	}
 }
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
                   ` (24 preceding siblings ...)
  2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
@ 2015-03-31  0:07 ` Casey Schaufler
  2015-03-31  0:14   ` Joe Perches
  25 siblings, 1 reply; 71+ messages in thread
From: Casey Schaufler @ 2015-03-31  0:07 UTC (permalink / raw)
  To: Joe Perches, linux-kernel, linux-arm-kernel, kvmarm, kvm,
	linux-omap, kvm-ppc, virtualization, linux-fsdevel, linux-nfs,
	linux-ide, kgdb-bugreport, linux-mm, linux-pm, netdev,
	alsa-devel, bridge, netfilter-devel, coreteam, patches
  Cc: linux-hexagon, linux-ia64, linux-mips, linuxppc-dev, linux-s390,
	sparclinux, linux-scsi, linux-security-module

On 3/30/2015 4:45 PM, Joe Perches wrote:
> Joe Perches (25):
>   arm: Use bool function return values of true/false not 1/0
>   arm64: Use bool function return values of true/false not 1/0
>   hexagon: Use bool function return values of true/false not 1/0
>   ia64: Use bool function return values of true/false not 1/0
>   mips: Use bool function return values of true/false not 1/0
>   powerpc: Use bool function return values of true/false not 1/0
>   s390: Use bool function return values of true/false not 1/0
>   sparc: Use bool function return values of true/false not 1/0
>   tile: Use bool function return values of true/false not 1/0
>   unicore32: Use bool function return values of true/false not 1/0
>   x86: Use bool function return values of true/false not 1/0
>   virtio_console: Use bool function return values of true/false not 1/0
>   csiostor: Use bool function return values of true/false not 1/0
>   dcache: Use bool function return values of true/false not 1/0
>   nfsd: nfs4state: Use bool function return values of true/false not 1/0
>   include/linux: Use bool function return values of true/false not 1/0
>   sound: Use bool function return values of true/false not 1/0
>   rcu: tree_plugin: Use bool function return values of true/false not 1/0
>   sched: Use bool function return values of true/false not 1/0
>   ftrace: Use bool function return values of true/false not 1/0
>   slub: Use bool function return values of true/false not 1/0
>   bridge: Use bool function return values of true/false not 1/0
>   netfilter: Use bool function return values of true/false not 1/0
>   security: Use bool function return values of true/false not 1/0
>   sound: wm5100-tables: Use bool function return values of true/false not 1/0
>
>  arch/arm/include/asm/dma-mapping.h           |  8 ++--
>  arch/arm/include/asm/kvm_emulate.h           |  2 +-
>  arch/arm/mach-omap2/powerdomain.c            | 14 +++---
>  arch/arm64/include/asm/dma-mapping.h         |  2 +-
>  arch/hexagon/include/asm/dma-mapping.h       |  2 +-
>  arch/ia64/include/asm/dma-mapping.h          |  2 +-
>  arch/mips/include/asm/dma-mapping.h          |  2 +-
>  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 +-
>  arch/s390/include/asm/dma-mapping.h          |  2 +-
>  arch/sparc/mm/init_64.c                      |  8 ++--
>  arch/tile/include/asm/dma-mapping.h          |  2 +-
>  arch/unicore32/include/asm/dma-mapping.h     |  2 +-
>  arch/x86/include/asm/archrandom.h            |  2 +-
>  arch/x86/include/asm/dma-mapping.h           |  2 +-
>  arch/x86/include/asm/kvm_para.h              |  2 +-
>  arch/x86/kvm/cpuid.h                         |  2 +-
>  arch/x86/kvm/vmx.c                           | 72 ++++++++++++++--------------
>  drivers/char/virtio_console.c                |  2 +-
>  drivers/scsi/csiostor/csio_scsi.c            |  4 +-
>  fs/dcache.c                                  | 12 ++---
>  fs/nfsd/nfs4state.c                          |  2 +-
>  include/linux/blkdev.h                       |  2 +-
>  include/linux/ide.h                          |  2 +-
>  include/linux/kgdb.h                         |  2 +-
>  include/linux/mfd/db8500-prcmu.h             |  2 +-
>  include/linux/mm.h                           |  2 +-
>  include/linux/power_supply.h                 |  8 ++--
>  include/linux/ssb/ssb_driver_extif.h         |  2 +-
>  include/linux/ssb/ssb_driver_gige.h          | 16 +++----
>  include/sound/soc.h                          |  4 +-
>  kernel/rcu/tree_plugin.h                     |  4 +-
>  kernel/sched/auto_group.h                    |  2 +-
>  kernel/sched/completion.c                    | 16 ++++---
>  kernel/trace/ftrace.c                        | 10 ++--
>  mm/slub.c                                    | 12 ++---
>  net/bridge/br_private.h                      |  2 +-
>  net/ipv4/netfilter/ipt_ah.c                  |  2 +-
>  net/netfilter/ipset/ip_set_hash_ip.c         |  8 ++--
>  net/netfilter/ipset/ip_set_hash_ipmark.c     |  8 ++--
>  net/netfilter/ipset/ip_set_hash_ipport.c     |  8 ++--
>  net/netfilter/ipset/ip_set_hash_ipportip.c   |  8 ++--
>  net/netfilter/ipset/ip_set_hash_ipportnet.c  |  8 ++--
>  net/netfilter/ipset/ip_set_hash_net.c        |  8 ++--
>  net/netfilter/ipset/ip_set_hash_netiface.c   |  8 ++--
>  net/netfilter/ipset/ip_set_hash_netport.c    |  8 ++--
>  net/netfilter/ipset/ip_set_hash_netportnet.c |  8 ++--
>  net/netfilter/xt_connlimit.c                 |  2 +-
>  net/netfilter/xt_hashlimit.c                 |  2 +-
>  net/netfilter/xt_ipcomp.c                    |  2 +-
>  security/apparmor/file.c                     |  8 ++--
>  security/apparmor/policy.c                   | 10 ++--
>  sound/soc/codecs/wm5100-tables.c             | 12 ++---

Why, and why these in particular?

>  55 files changed, 178 insertions(+), 176 deletions(-)
>


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0
  2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
@ 2015-03-31  0:14   ` Joe Perches
  0 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-31  0:14 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: linux-kernel, linux-arm-kernel, kvmarm, kvm, linux-omap, kvm-ppc,
	virtualization, linux-fsdevel, linux-nfs, linux-ide,
	kgdb-bugreport, linux-mm, linux-pm, netdev, alsa-devel, bridge,
	netfilter-devel, coreteam, patches, linux-hexagon, linux-ia64,
	linux-mips, linuxppc-dev, linux-s390, sparclinux, linux-scsi,
	linux-security-module

On Mon, 2015-03-30 at 17:07 -0700, Casey Schaufler wrote:
> On 3/30/2015 4:45 PM, Joe Perches wrote:
> > Joe Perches (25):
> >   arm: Use bool function return values of true/false not 1/0

[etc...]

> Why, and why these in particular?

bool functions are probably better returning
bool values instead of 1 and 0.

Especially when the functions intermix returning
returning 1/0 and true/false.

(there are only a couple of those though)

These are all the remaining instances in the
kernel tree.


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
@ 2015-03-31  1:49   ` Benjamin Herrenschmidt
  2015-03-31  1:57     ` Joe Perches
  0 siblings, 1 reply; 71+ messages in thread
From: Benjamin Herrenschmidt @ 2015-03-31  1:49 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Alexander Graf, Gleb Natapov, Paolo Bonzini,
	Paul Mackerras, Michael Ellerman, linuxppc-dev, kvm-ppc, kvm

On Mon, 2015-03-30 at 16:46 -0700, Joe Perches wrote:
> Use the normal return values for bool functions

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Should we merge it or will you ?

Cheers,
Ben.

> Signed-off-by: Joe Perches <joe@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);
>  



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/25] powerpc: Use bool function return values of true/false not 1/0
  2015-03-31  1:49   ` Benjamin Herrenschmidt
@ 2015-03-31  1:57     ` Joe Perches
  0 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-31  1:57 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linux-kernel, Alexander Graf, Gleb Natapov, Paolo Bonzini,
	Paul Mackerras, Michael Ellerman, linuxppc-dev, kvm-ppc, kvm

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 <benh@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


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 12/25] virtio_console: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
@ 2015-03-31  5:32   ` Amit Shah
  0 siblings, 0 replies; 71+ messages in thread
From: Amit Shah @ 2015-03-31  5:32 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Arnd Bergmann, Greg Kroah-Hartman, virtualization

On (Mon) 30 Mar 2015 [16:46:10], Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/char/virtio_console.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index 72d7028..50754d20 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -355,7 +355,7 @@ static inline bool use_multiport(struct ports_device *portdev)
>  	 * early_init
>  	 */
>  	if (!portdev->vdev)
> -		return 0;
> +		return false;

Reviewed-by: Amit Shah <amit.shah@redhat.com>

		Amit

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 24/25] security: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
@ 2015-03-31  6:03   ` John Johansen
  0 siblings, 0 replies; 71+ messages in thread
From: John Johansen @ 2015-03-31  6:03 UTC (permalink / raw)
  To: Joe Perches, linux-kernel
  Cc: James Morris, Serge E. Hallyn, linux-security-module

On 03/30/2015 04:46 PM, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
Joe, I'll pull this into my tree and send it up with a couple of other
patches I have pending

Acked-by: John Johansen <john.johansen@canonical.com>

> ---
>  security/apparmor/file.c   |  8 ++++----
>  security/apparmor/policy.c | 10 +++++-----
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/security/apparmor/file.c b/security/apparmor/file.c
> index fdaa50c..bd804d4 100644
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -260,8 +260,8 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start,
>  static inline bool is_deleted(struct dentry *dentry)
>  {
>  	if (d_unlinked(dentry) && dentry->d_inode->i_nlink == 0)
> -		return 1;
> -	return 0;
> +		return true;
> +	return false;
>  }
>  
>  /**
> @@ -322,9 +322,9 @@ static inline bool xindex_is_subset(u32 link, u32 target)
>  {
>  	if (((link & ~AA_X_UNSAFE) != (target & ~AA_X_UNSAFE)) ||
>  	    ((link & AA_X_UNSAFE) && !(target & AA_X_UNSAFE)))
> -		return 0;
> +		return false;
>  
> -	return 1;
> +	return true;
>  }
>  
>  /**
> diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
> index 705c287..a8e0177 100644
> --- a/security/apparmor/policy.c
> +++ b/security/apparmor/policy.c
> @@ -137,13 +137,13 @@ static bool policy_init(struct aa_policy *policy, const char *prefix,
>  	} else
>  		policy->hname = kstrdup(name, GFP_KERNEL);
>  	if (!policy->hname)
> -		return 0;
> +		return false;
>  	/* base.name is a substring of fqname */
>  	policy->name = (char *)hname_tail(policy->hname);
>  	INIT_LIST_HEAD(&policy->list);
>  	INIT_LIST_HEAD(&policy->profiles);
>  
> -	return 1;
> +	return true;
>  }
>  
>  /**
> @@ -927,15 +927,15 @@ bool aa_may_manage_policy(int op)
>  	/* check if loading policy is locked out */
>  	if (aa_g_lock_policy) {
>  		audit_policy(op, GFP_KERNEL, NULL, "policy_locked", -EACCES);
> -		return 0;
> +		return false;
>  	}
>  
>  	if (!capable(CAP_MAC_ADMIN)) {
>  		audit_policy(op, GFP_KERNEL, NULL, "not policy admin", -EACCES);
> -		return 0;
> +		return false;
>  	}
>  
> -	return 1;
> +	return true;
>  }
>  
>  static struct aa_profile *__list_lookup_parent(struct list_head *lh,
> 


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 17/25] sound: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
@ 2015-03-31  7:11   ` Mark Brown
  0 siblings, 0 replies; 71+ messages in thread
From: Mark Brown @ 2015-03-31  7:11 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

On Mon, Mar 30, 2015 at 04:46:15PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions

Joe, as has been *repeatedly* requested you should use subject lines
matching the style for the subsystem.  

Please also remember to CC people on the cover letters for serieses so
they know if there's dependencies (if the series is actually a bunch of
separate patches consider sending that way).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 07/25] s390: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
@ 2015-03-31  7:13   ` Heiko Carstens
  0 siblings, 0 replies; 71+ messages in thread
From: Heiko Carstens @ 2015-03-31  7:13 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Martin Schwidefsky, linux390, linux-s390

On Mon, Mar 30, 2015 at 04:46:05PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/s390/include/asm/dma-mapping.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/include/asm/dma-mapping.h b/arch/s390/include/asm/dma-mapping.h
> index 709955d..9d39596 100644
> --- a/arch/s390/include/asm/dma-mapping.h
> +++ b/arch/s390/include/asm/dma-mapping.h
> @@ -42,7 +42,7 @@ static inline int dma_supported(struct device *dev, u64 mask)
>  static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
>  {
>  	if (!dev->dma_mask)
> -		return 0;
> +		return false;
>  	return addr + size - 1 <= *dev->dma_mask;
>  }

Applied, thanks!


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 16/25] include/linux: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
@ 2015-03-31  7:41   ` Lee Jones
  2015-04-06 19:39   ` Sebastian Reichel
  1 sibling, 0 replies; 71+ messages in thread
From: Lee Jones @ 2015-03-31  7:41 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, David S. Miller, Jason Wessel, Samuel Ortiz,
	Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
	Michael Buesch, linux-ide, kgdb-bugreport, linux-mm, linux-pm,
	netdev

On Mon, 30 Mar 2015, Joe Perches wrote:

> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  include/linux/blkdev.h               |  2 +-
>  include/linux/ide.h                  |  2 +-
>  include/linux/kgdb.h                 |  2 +-
>  include/linux/mfd/db8500-prcmu.h     |  2 +-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  include/linux/mm.h                   |  2 +-
>  include/linux/power_supply.h         |  8 ++++----
>  include/linux/ssb/ssb_driver_extif.h |  2 +-
>  include/linux/ssb/ssb_driver_gige.h  | 16 ++++++++--------
>  8 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 5d93a66..eced869 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1591,7 +1591,7 @@ static inline bool blk_integrity_merge_bio(struct request_queue *rq,
>  }
>  static inline bool blk_integrity_is_initialized(struct gendisk *g)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  #endif /* CONFIG_BLK_DEV_INTEGRITY */
> diff --git a/include/linux/ide.h b/include/linux/ide.h
> index 93b5ca7..1ba07db 100644
> --- a/include/linux/ide.h
> +++ b/include/linux/ide.h
> @@ -1411,7 +1411,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *);
>  extern void ide_acpi_set_state(ide_hwif_t *hwif, int on);
>  #else
>  static inline int ide_acpi_init(void) { return 0; }
> -static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; }
> +static inline bool ide_port_acpi(ide_hwif_t *hwif) { return false; }
>  static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; }
>  static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; }
>  static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; }
> diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
> index e465bb1..840f494 100644
> --- a/include/linux/kgdb.h
> +++ b/include/linux/kgdb.h
> @@ -292,7 +292,7 @@ extern bool kgdb_nmi_poll_knock(void);
>  #else
>  static inline int kgdb_register_nmi_console(void) { return 0; }
>  static inline int kgdb_unregister_nmi_console(void) { return 0; }
> -static inline bool kgdb_nmi_poll_knock(void) { return 1; }
> +static inline bool kgdb_nmi_poll_knock(void) { return true; }
>  #endif
>  
>  extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 0bd6944..3b06175 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -744,7 +744,7 @@ static inline int db8500_prcmu_load_a9wdog(u8 id, u32 val)
>  
>  static inline bool db8500_prcmu_is_ac_wake_requested(void)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  static inline int db8500_prcmu_set_arm_opp(u8 opp)
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 4a3a385..164108c 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -819,7 +819,7 @@ static inline int cpu_pid_to_cpupid(int nid, int pid)
>  
>  static inline bool cpupid_pid_unset(int cpupid)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  static inline void page_cpupid_reset_last(struct page *page)
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 75a1dd8..b0b45c7 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -350,12 +350,12 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp)
>  	case POWER_SUPPLY_PROP_CURRENT_NOW:
>  	case POWER_SUPPLY_PROP_CURRENT_AVG:
>  	case POWER_SUPPLY_PROP_CURRENT_BOOT:
> -		return 1;
> +		return true;
>  	default:
>  		break;
>  	}
>  
> -	return 0;
> +	return false;
>  }
>  
>  static inline bool power_supply_is_watt_property(enum power_supply_property psp)
> @@ -378,12 +378,12 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
>  	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
>  	case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX:
>  	case POWER_SUPPLY_PROP_POWER_NOW:
> -		return 1;
> +		return true;
>  	default:
>  		break;
>  	}
>  
> -	return 0;
> +	return false;
>  }
>  
>  #endif /* __LINUX_POWER_SUPPLY_H__ */
> diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
> index a410e84..5766b6f 100644
> --- a/include/linux/ssb/ssb_driver_extif.h
> +++ b/include/linux/ssb/ssb_driver_extif.h
> @@ -198,7 +198,7 @@ struct ssb_extif {
>  
>  static inline bool ssb_extif_available(struct ssb_extif *extif)
>  {
> -	return 0;
> +	return false;
>  }
>  
>  static inline
> diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
> index 0688472..65f7740 100644
> --- a/include/linux/ssb/ssb_driver_gige.h
> +++ b/include/linux/ssb/ssb_driver_gige.h
> @@ -75,7 +75,7 @@ static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
>  	if (dev)
>  		return !!(dev->dev->bus->sprom.boardflags_lo &
>  			  SSB_GIGE_BFL_ROBOSWITCH);
> -	return 0;
> +	return false;
>  }
>  
>  /* Returns whether we can only do one DMA at once. */
> @@ -85,7 +85,7 @@ static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
>  	if (dev)
>  		return ((dev->dev->bus->chip_id == 0x4785) &&
>  			(dev->dev->bus->chip_rev < 2));
> -	return 0;
> +	return false;
>  }
>  
>  /* Returns whether we must flush posted writes. */
> @@ -94,7 +94,7 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
>  	struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
>  	if (dev)
>  		return (dev->dev->bus->chip_id == 0x4785);
> -	return 0;
> +	return false;
>  }
>  
>  /* Get the device MAC address */
> @@ -158,7 +158,7 @@ static inline void ssb_gige_exit(void)
>  
>  static inline bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
>  {
> @@ -166,19 +166,19 @@ static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
>  }
>  static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
>  {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
@ 2015-03-31  8:53   ` Peter Zijlstra
  2015-03-31  9:03     ` Ingo Molnar
  2015-03-31  9:09     ` [PATCH 19/25] sched: Use bool function return values of true/false not 1/0 Joe Perches
  2015-04-01  5:17   ` Jason Low
  1 sibling, 2 replies; 71+ messages in thread
From: Peter Zijlstra @ 2015-03-31  8:53 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Ingo Molnar

On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Update the other sets of ret in try_wait_for_completion.

I'm missing a why; why are you doing this?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-31  8:53   ` Peter Zijlstra
@ 2015-03-31  9:03     ` Ingo Molnar
  2015-03-31 16:46       ` Joe Perches
  2015-03-31  9:09     ` [PATCH 19/25] sched: Use bool function return values of true/false not 1/0 Joe Perches
  1 sibling, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2015-03-31  9:03 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Joe Perches, linux-kernel, Ingo Molnar


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > Use the normal return values for bool functions
> > 
> > Update the other sets of ret in try_wait_for_completion.
> 
> I'm missing a why; why are you doing this?

Let me guess: Joe Perches is suffering from 'trivialititis': a 
sickness that prevents a non-newbie kernel developer from raising 
beyond churning out a flood of trivial patches and creating 
unnecessary churn for other developers with these borderline useless 
patches?

Linux is a meritocracy, not a bureaucracy.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-31  8:53   ` Peter Zijlstra
  2015-03-31  9:03     ` Ingo Molnar
@ 2015-03-31  9:09     ` Joe Perches
  1 sibling, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-31  9:09 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel, Ingo Molnar

On Tue, 2015-03-31 at 10:53 +0200, Peter Zijlstra wrote:
> On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > Use the normal return values for bool fsnctions
> > 
> > Update the other sets of ret in try_wait_for_completion.
> 
> I'm missing a why; why are you doing this?

It's just a trivial little consistency patch to
make bool functions return bool values instead of
1 or 0 (even though of course 1 and 0 are the
values for true and false)

There's something like 13000 uses of return true
or return false in the tree vs these 180 or so
uses of 1 and 0.


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 02/25] arm64: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
@ 2015-03-31 15:29   ` Will Deacon
  0 siblings, 0 replies; 71+ messages in thread
From: Will Deacon @ 2015-03-31 15:29 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Catalin Marinas, linux-arm-kernel

On Tue, Mar 31, 2015 at 12:46:00AM +0100, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/arm64/include/asm/dma-mapping.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
> index 6932bb5..9437e3d 100644
> --- a/arch/arm64/include/asm/dma-mapping.h
> +++ b/arch/arm64/include/asm/dma-mapping.h
> @@ -97,7 +97,7 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
>  static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
>  {
>  	if (!dev->dma_mask)
> -		return 0;
> +		return false;
>  
>  	return addr + size - 1 <= *dev->dma_mask;
>  }
> -- 
> 2.1.2

Looks simple enough, I'll pick it up for 4.1.

Will

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 01/25] arm: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
@ 2015-03-31 15:54   ` Tony Lindgren
  2015-03-31 15:58   ` Paolo Bonzini
  1 sibling, 0 replies; 71+ messages in thread
From: Tony Lindgren @ 2015-03-31 15:54 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Christoffer Dall, Marc Zyngier, Gleb Natapov,
	Paolo Bonzini, Russell King, linux-arm-kernel, kvmarm, kvm,
	linux-omap

* Joe Perches <joe@perches.com> [150330 16:47]:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/include/asm/dma-mapping.h |  8 ++++----
>  arch/arm/include/asm/kvm_emulate.h |  2 +-
>  arch/arm/mach-omap2/powerdomain.c  | 14 +++++++-------
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
> index b52101d..166e1e1 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> @@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
>  	u64 limit, mask;
>  
>  	if (!dev->dma_mask)
> -		return 0;
> +		return false;
>  
>  	mask = *dev->dma_mask;
>  
>  	limit = (mask + 1) & ~mask;
>  	if (limit && size > limit)
> -		return 0;
> +		return false;
>  
>  	if ((addr | (addr + size - 1)) & ~mask)
> -		return 0;
> +		return false;
>  
> -	return 1;
> +	return true;
>  }
>  
>  static inline void dma_mark_clean(void *addr, size_t size) { }
> diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
> index a9c80a2..ad200a0 100644
> --- a/arch/arm/include/asm/kvm_emulate.h
> +++ b/arch/arm/include/asm/kvm_emulate.h
> @@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, unsigned long hcr)
>  
>  static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
> diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
> index 78af6d8..897f9fb 100644
> --- a/arch/arm/mach-omap2/powerdomain.c
> +++ b/arch/arm/mach-omap2/powerdomain.c
> @@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
>   */
>  bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
>  {
> -	return (pwrdm && pwrdm->flags & PWRDM_HAS_HDWR_SAR) ? 1 : 0;
> +	return pwrdm && (pwrdm->flags & PWRDM_HAS_HDWR_SAR);
>  }
>  
>  int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
> @@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
>  	if (!pwrdm) {
>  		pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
>  			 __func__);
> -		return 1;
> +		return true;
>  	}
>  
>  	if (pwrdm->pwrsts & PWRSTS_OFF)
> -		return 1;
> +		return true;
>  
>  	if (pwrdm->pwrsts & PWRSTS_RET) {
>  		if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
> -			return 1;
> +			return true;
>  
>  		for (i = 0; i < pwrdm->banks; i++)
>  			if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
> -				return 1;
> +				return true;
>  	}
>  
>  	for (i = 0; i < pwrdm->banks; i++)
>  		if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
> -			return 1;
> +			return true;
>  
> -	return 0;
> +	return false;
>  }
> -- 
> 2.1.2
> 

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 01/25] arm: Use bool function return values of true/false not 1/0
  2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
  2015-03-31 15:54   ` Tony Lindgren
@ 2015-03-31 15:58   ` Paolo Bonzini
  2015-03-31 16:05     ` Marc Zyngier
  1 sibling, 1 reply; 71+ messages in thread
From: Paolo Bonzini @ 2015-03-31 15:58 UTC (permalink / raw)
  To: Joe Perches, linux-kernel, Christoffer Dall, Marc Zyngier,
	Gleb Natapov, Tony Lindgren
  Cc: Russell King, linux-arm-kernel, kvmarm, kvm, linux-omap

On 31/03/2015 01:45, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/arm/include/asm/dma-mapping.h |  8 ++++----
>  arch/arm/include/asm/kvm_emulate.h |  2 +-
>  arch/arm/mach-omap2/powerdomain.c  | 14 +++++++-------
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
> index b52101d..166e1e1 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> @@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
>  	u64 limit, mask;
>  
>  	if (!dev->dma_mask)
> -		return 0;
> +		return false;
>  
>  	mask = *dev->dma_mask;
>  
>  	limit = (mask + 1) & ~mask;
>  	if (limit && size > limit)
> -		return 0;
> +		return false;
>  
>  	if ((addr | (addr + size - 1)) & ~mask)
> -		return 0;
> +		return false;
>  
> -	return 1;
> +	return true;
>  }
>  
>  static inline void dma_mark_clean(void *addr, size_t size) { }
> diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
> index a9c80a2..ad200a0 100644
> --- a/arch/arm/include/asm/kvm_emulate.h
> +++ b/arch/arm/include/asm/kvm_emulate.h
> @@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, unsigned long hcr)
>  
>  static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
> diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
> index 78af6d8..897f9fb 100644
> --- a/arch/arm/mach-omap2/powerdomain.c
> +++ b/arch/arm/mach-omap2/powerdomain.c
> @@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
>   */
>  bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
>  {
> -	return (pwrdm && pwrdm->flags & PWRDM_HAS_HDWR_SAR) ? 1 : 0;
> +	return pwrdm && (pwrdm->flags & PWRDM_HAS_HDWR_SAR);
>  }
>  
>  int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
> @@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
>  	if (!pwrdm) {
>  		pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
>  			 __func__);
> -		return 1;
> +		return true;
>  	}
>  
>  	if (pwrdm->pwrsts & PWRSTS_OFF)
> -		return 1;
> +		return true;
>  
>  	if (pwrdm->pwrsts & PWRSTS_RET) {
>  		if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
> -			return 1;
> +			return true;
>  
>  		for (i = 0; i < pwrdm->banks; i++)
>  			if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
> -				return 1;
> +				return true;
>  	}
>  
>  	for (i = 0; i < pwrdm->banks; i++)
>  		if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
> -			return 1;
> +			return true;
>  
> -	return 0;
> +	return false;
>  }
> 

Marc/Christoffer, please pick this up yourself.

Paolo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 01/25] arm: Use bool function return values of true/false not 1/0
  2015-03-31 15:58   ` Paolo Bonzini
@ 2015-03-31 16:05     ` Marc Zyngier
  0 siblings, 0 replies; 71+ messages in thread
From: Marc Zyngier @ 2015-03-31 16:05 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Joe Perches, linux-kernel, Christoffer Dall, Gleb Natapov,
	Tony Lindgren, Russell King, linux-arm-kernel, kvmarm, kvm,
	linux-omap

On Tue, 31 Mar 2015 16:58:28 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 31/03/2015 01:45, Joe Perches wrote:
> > Use the normal return values for bool functions
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  arch/arm/include/asm/dma-mapping.h |  8 ++++----
> >  arch/arm/include/asm/kvm_emulate.h |  2 +-
> >  arch/arm/mach-omap2/powerdomain.c  | 14 +++++++-------
> >  3 files changed, 12 insertions(+), 12 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
> > index b52101d..166e1e1 100644
> > --- a/arch/arm/include/asm/dma-mapping.h
> > +++ b/arch/arm/include/asm/dma-mapping.h
> > @@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
> >  	u64 limit, mask;
> >  
> >  	if (!dev->dma_mask)
> > -		return 0;
> > +		return false;
> >  
> >  	mask = *dev->dma_mask;
> >  
> >  	limit = (mask + 1) & ~mask;
> >  	if (limit && size > limit)
> > -		return 0;
> > +		return false;
> >  
> >  	if ((addr | (addr + size - 1)) & ~mask)
> > -		return 0;
> > +		return false;
> >  
> > -	return 1;
> > +	return true;
> >  }
> >  
> >  static inline void dma_mark_clean(void *addr, size_t size) { }
> > diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
> > index a9c80a2..ad200a0 100644
> > --- a/arch/arm/include/asm/kvm_emulate.h
> > +++ b/arch/arm/include/asm/kvm_emulate.h
> > @@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, unsigned long hcr)
> >  
> >  static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
> >  {
> > -	return 1;
> > +	return true;
> >  }
> >  
> >  static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
> > diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
> > index 78af6d8..897f9fb 100644
> > --- a/arch/arm/mach-omap2/powerdomain.c
> > +++ b/arch/arm/mach-omap2/powerdomain.c
> > @@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
> >   */
> >  bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
> >  {
> > -	return (pwrdm && pwrdm->flags & PWRDM_HAS_HDWR_SAR) ? 1 : 0;
> > +	return pwrdm && (pwrdm->flags & PWRDM_HAS_HDWR_SAR);
> >  }
> >  
> >  int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
> > @@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
> >  	if (!pwrdm) {
> >  		pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
> >  			 __func__);
> > -		return 1;
> > +		return true;
> >  	}
> >  
> >  	if (pwrdm->pwrsts & PWRSTS_OFF)
> > -		return 1;
> > +		return true;
> >  
> >  	if (pwrdm->pwrsts & PWRSTS_RET) {
> >  		if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
> > -			return 1;
> > +			return true;
> >  
> >  		for (i = 0; i < pwrdm->banks; i++)
> >  			if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
> > -				return 1;
> > +				return true;
> >  	}
> >  
> >  	for (i = 0; i < pwrdm->banks; i++)
> >  		if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
> > -			return 1;
> > +			return true;
> >  
> > -	return 0;
> > +	return false;
> >  }
> > 
> 
> Marc/Christoffer, please pick this up yourself.

Given that it touches a range of completely unrelated files, for the
KVM part:

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 11/25] x86: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
@ 2015-03-31 16:05   ` Paolo Bonzini
  0 siblings, 0 replies; 71+ messages in thread
From: Paolo Bonzini @ 2015-03-31 16:05 UTC (permalink / raw)
  To: Joe Perches, linux-kernel, Gleb Natapov
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, kvm



On 31/03/2015 01:46, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/x86/include/asm/archrandom.h  |  2 +-
>  arch/x86/include/asm/dma-mapping.h |  2 +-
>  arch/x86/include/asm/kvm_para.h    |  2 +-
>  arch/x86/kvm/cpuid.h               |  2 +-
>  arch/x86/kvm/vmx.c                 | 72 +++++++++++++++++++-------------------
>  5 files changed, 40 insertions(+), 40 deletions(-)

Applied arch/x86/include/asm/kvm_para.h and arch/x86/kvm/* parts, thanks.

Paolo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-31  9:03     ` Ingo Molnar
@ 2015-03-31 16:46       ` Joe Perches
  2015-04-01  6:58         ` Peter Zijlstra
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
  0 siblings, 2 replies; 71+ messages in thread
From: Joe Perches @ 2015-03-31 16:46 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel, Ingo Molnar

On Tue, 2015-03-31 at 11:03 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > > Use the normal return values for bool functions
> > > 
> > > Update the other sets of ret in try_wait_for_completion.
> > 
> > I'm missing a why; why are you doing this?
> 
> Let me guess: Joe Perches is suffering from 'trivialititis': a 
> sickness that prevents a non-newbie kernel developer from raising 
> beyond churning out a flood of trivial patches and creating 
> unnecessary churn for other developers with these borderline useless 
> patches?

Good morning Ingo.

As you are a signer of that "code of conflict" patch,
I'll be mildly amused, but not surprised, if you are
among the first participants.

Perhaps you can search for your own name here.
http://lwn.net/Articles/637037/

cheers, Joe


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 23/25] netfilter: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 23/25] netfilter: " Joe Perches
@ 2015-03-31 16:58   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 71+ messages in thread
From: Pablo Neira Ayuso @ 2015-03-31 16:58 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Patrick McHardy, Jozsef Kadlecsik, David S. Miller,
	Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	netfilter-devel, coreteam, netdev

On Mon, Mar 30, 2015 at 04:46:21PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions
>
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 21/25] slub: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
@ 2015-04-01  3:29   ` David Rientjes
  0 siblings, 0 replies; 71+ messages in thread
From: David Rientjes @ 2015-04-01  3:29 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Christoph Lameter, Pekka Enberg, Joonsoo Kim,
	Andrew Morton, linux-mm

On Mon, 30 Mar 2015, Joe Perches wrote:

> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
  2015-03-31  8:53   ` Peter Zijlstra
@ 2015-04-01  5:17   ` Jason Low
  2015-04-01  5:46     ` [PATCH V2 " Joe Perches
  1 sibling, 1 reply; 71+ messages in thread
From: Jason Low @ 2015-04-01  5:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: Linux Kernel Mailing List, Ingo Molnar, Peter Zijlstra

On Mon, Mar 30, 2015 at 4:46 PM, Joe Perches <joe@perches.com> wrote:

>   *     try_wait_for_completion - try to decrement a completion without blocking
>   *     @x:     completion structure
>   *
> - *     Return: 0 if a decrement cannot be done without blocking
> - *              1 if a decrement succeeded.
> + *     Return: true if a decrement cannot be done without blocking
> + *             false if a decrement succeeded.

Hi Joe,

The boolean logic was reversed in this comment. The function should be
returning false if a decrement cannot be done without blocking, and
true if a decrement succeeded.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH V2 19/25] sched: Use bool function return values of true/false not 1/0
  2015-04-01  5:17   ` Jason Low
@ 2015-04-01  5:46     ` Joe Perches
  0 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-04-01  5:46 UTC (permalink / raw)
  To: Jason Low; +Cc: Linux Kernel Mailing List, Ingo Molnar, Peter Zijlstra

Use the normal return values for bool functions

Update the other sets of ret in try_wait_for_completion.

Signed-off-by: Joe Perches <joe@perches.com>
---

On Tue, 2015-03-31 at 22:17 -0700, Jason Low wrote:
> On Mon, Mar 30, 2015 at 4:46 PM, Joe Perches <joe@perches.com> wrote:
> 
> >   *     try_wait_for_completion - try to decrement a completion without blocking
> >   *     @x:     completion structure
> >   *
> > - *     Return: 0 if a decrement cannot be done without blocking
> > - *              1 if a decrement succeeded.
> > + *     Return: true if a decrement cannot be done without blocking
> > + *             false if a decrement succeeded.
> The boolean logic was reversed in this comment. The function should be
> returning false if a decrement cannot be done without blocking, and
> true if a decrement succeeded.

Hi Jason, right, my typo, thanks for noticing.

 kernel/sched/auto_group.h |  2 +-
 kernel/sched/completion.c | 16 +++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/kernel/sched/auto_group.h b/kernel/sched/auto_group.h
index 8bd0471..309b6f2 100644
--- a/kernel/sched/auto_group.h
+++ b/kernel/sched/auto_group.h
@@ -45,7 +45,7 @@ static inline void autogroup_init(struct task_struct *init_task) {  }
 static inline void autogroup_free(struct task_group *tg) { }
 static inline bool task_group_is_autogroup(struct task_group *tg)
 {
-	return 0;
+	return false;
 }
 
 static inline struct task_group *
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index 8d0f35d..cbccaa0 100644
--- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c
@@ -255,8 +255,8 @@ EXPORT_SYMBOL(wait_for_completion_killable_timeout);
  *	try_wait_for_completion - try to decrement a completion without blocking
  *	@x:	completion structure
  *
- *	Return: 0 if a decrement cannot be done without blocking
- *		 1 if a decrement succeeded.
+ *	Return: false if a decrement cannot be done without blocking
+ *		true if a decrement succeeded.
  *
  *	If a completion is being used as a counting completion,
  *	attempt to decrement the counter without blocking. This
@@ -266,7 +266,7 @@ EXPORT_SYMBOL(wait_for_completion_killable_timeout);
 bool try_wait_for_completion(struct completion *x)
 {
 	unsigned long flags;
-	int ret = 1;
+	bool ret;
 
 	/*
 	 * Since x->done will need to be locked only
@@ -275,13 +275,15 @@ bool try_wait_for_completion(struct completion *x)
 	 * return early in the blocking case.
 	 */
 	if (!READ_ONCE(x->done))
-		return 0;
+		return false;
 
 	spin_lock_irqsave(&x->wait.lock, flags);
-	if (!x->done)
-		ret = 0;
-	else
+	if (!x->done) {
+		ret = false;
+	} else {
 		x->done--;
+		ret = true;
+	}
 	spin_unlock_irqrestore(&x->wait.lock, flags);
 	return ret;
 }



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0
  2015-03-31 16:46       ` Joe Perches
@ 2015-04-01  6:58         ` Peter Zijlstra
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
  1 sibling, 0 replies; 71+ messages in thread
From: Peter Zijlstra @ 2015-04-01  6:58 UTC (permalink / raw)
  To: Joe Perches; +Cc: Ingo Molnar, linux-kernel, Ingo Molnar

On Tue, Mar 31, 2015 at 09:46:40AM -0700, Joe Perches wrote:
> On Tue, 2015-03-31 at 11:03 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> > > On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > > > Use the normal return values for bool functions
> > > > 
> > > > Update the other sets of ret in try_wait_for_completion.
> > > 
> > > I'm missing a why; why are you doing this?
> > 
> > Let me guess: Joe Perches is suffering from 'trivialititis': a 
> > sickness that prevents a non-newbie kernel developer from raising 
> > beyond churning out a flood of trivial patches and creating 
> > unnecessary churn for other developers with these borderline useless 
> > patches?
> 
> Good morning Ingo.
> 
> As you are a signer of that "code of conflict" patch,
> I'll be mildly amused, but not surprised, if you are
> among the first participants.

OMFG, exactly the kind of f'king nonsense I was afraid of. PC brigade
gone rampant. Get a live people. An Joe please go do something useful.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 25/25] sound: wm5100-tables: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
@ 2015-04-01 11:54   ` Charles Keepax
  0 siblings, 0 replies; 71+ messages in thread
From: Charles Keepax @ 2015-04-01 11:54 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, alsa-devel, Takashi Iwai, patches, Liam Girdwood,
	Jaroslav Kysela, Mark Brown

On Mon, Mar 30, 2015 at 04:46:23PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---

Commit message is a little unusual, I would have expected
something more like "ASoC: wm5100: ....", but patch looks fine:

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 16/25] include/linux: Use bool function return values of true/false not 1/0
  2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
  2015-03-31  7:41   ` Lee Jones
@ 2015-04-06 19:39   ` Sebastian Reichel
  1 sibling, 0 replies; 71+ messages in thread
From: Sebastian Reichel @ 2015-04-06 19:39 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, David S. Miller, Jason Wessel, Samuel Ortiz,
	Lee Jones, Dmitry Eremin-Solenikov, David Woodhouse,
	Michael Buesch, linux-ide, kgdb-bugreport, linux-mm, linux-pm,
	netdev

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

Hi,

On Mon, Mar 30, 2015 at 04:46:14PM -0700, Joe Perches wrote:
> Use the normal return values for bool functions

Acked-By: Sebastian Reichel <sre@kernel.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-03-31 16:46       ` Joe Perches
  2015-04-01  6:58         ` Peter Zijlstra
@ 2015-04-07  9:12         ` Ingo Molnar
  2015-04-07  9:27           ` Ingo Molnar
                             ` (3 more replies)
  1 sibling, 4 replies; 71+ messages in thread
From: Ingo Molnar @ 2015-04-07  9:12 UTC (permalink / raw)
  To: Joe Perches
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Greg Kroah-Hartman,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin


* Joe Perches <joe@perches.com> wrote:

> On Tue, 2015-03-31 at 11:03 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> > > On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > > > Use the normal return values for bool functions
> > > > 
> > > > Update the other sets of ret in try_wait_for_completion.
> > > 
> > > I'm missing a why; why are you doing this?
> > 
> > Let me guess: Joe Perches is suffering from 'trivialititis': a 
> > sickness that prevents a non-newbie kernel developer from raising 
> > beyond churning out a flood of trivial patches and creating 
> > unnecessary churn for other developers with these borderline 
> > useless patches?
> >
> > Linux is a meritocracy, not a bureaucracy.
> 
> Good morning Ingo.
> 
> As you are a signer of that "code of conflict" patch,
> I'll be mildly amused, but not surprised, if you are
> among the first participants.

So as a reply to my joke directed against your (costly: see below) 
flood of trivial and somewhat bureaucratic patches that PeterZ 
complained about, which reply of mine aimed at getting you to change 
from your many years old pattern of producing trivial patches towards 
producing more substantial patches, causes you to issue a threat of 
bureaucratic action against me?

Wow.

I'd also like to stress that I don't think you have answered PeterZ's 
legitimate technical question adequately: what are the technological 
justifications for doing this 25 patches series - returning 0/1 or 
true/false is clearly a matter of taste unless mixed within the same 
function. In fact what are your technological justifications for doing 
so many trivial patches in general?

Please don't bother producing and sending me such trivial patches 
unless they:

  - fix a real bug (in which case they are not trivial patches anymore)

  - or are part of a larger (non-trivial!) series that does some real,
    substantial work on this code that tries to:

         - fix existing code

         - speed up existing code

         - or expand upon existing code with new code

         - turn totally unreadable code into something readable
           (for example in drivers/staging/)

The reason I'm not applying your patch is that trivial patches, even 
if they seem borderline useful, with no substance following them up, 
often have more costs than benefits:

 - they lead to pointless churn:

    - they take up Git space (and bandwidth) for no good reason

    - they slow down bisection of real changes

    - they take up (valuable!) reviewer bandwidth

    - they take up maintainer bandwidth

there's literally a million borderline pointless cleanup patches that 
could be done on the kernel, and we really don't want to add a million 
commits to the kernel tree...

I don't think your 25 patches long trivial series is defensible from a 
kernel contributor who has thousands of commits in the mainline kernel 
already: you are clearly not a kernel newbie anymore who needs to 
learn the ropes through simple patches and whose initially trivial 
patches maintainers will nurture in the hope of gaining a future 
contributor who will be a net benefit in the future...

I also think you are beginning to abuse the openness of kernel 
maintainers to apply trivial patches, and I don't think it's useful to 
point out such abuse before it gets worse.

My (repeated) advice to you is that you should try to raise beyond 
newbie patches and write something more substantial that helps Linux:

 - take a look at the many bugs on bugzilla.kernel.org and try to 
   analyze, reproduce or fix them

 - go read kernel code, understand it and try to find real bugs.

 - go test the latest kernels and find bugs in it. The fresher the 
   code, the more likely it is that it has bugs.

 - go read kernel code and try to expand upon it

Fortunately it's not hard to contribute to the kernel once you are 
beyond the 'newbie' status: there's literally an infinite amount of 
work to be done on the kernel, and I welcome productive contributions 
- but churning out trivial patches with no substantial patches 
following them up is not productive and in fact (as pointed out above) 
they are harmful once you are not a totally fresh newbie kernel 
developer anymore...

Pointing out this truth and protecting against such abusive flood of 
trivial patches is not against the code of conduct I signed.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
@ 2015-04-07  9:27           ` Ingo Molnar
  2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 71+ messages in thread
From: Ingo Molnar @ 2015-04-07  9:27 UTC (permalink / raw)
  To: Joe Perches
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Greg Kroah-Hartman,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin


* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Joe Perches <joe@perches.com> wrote:
> 
> > On Tue, 2015-03-31 at 11:03 +0200, Ingo Molnar wrote:
> > > * Peter Zijlstra <peterz@infradead.org> wrote:
> > > > On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > > > > Use the normal return values for bool functions
> > > > > 
> > > > > Update the other sets of ret in try_wait_for_completion.
> > > > 
> > > > I'm missing a why; why are you doing this?
> > > 
> > > Let me guess: Joe Perches is suffering from 'trivialititis': a 
> > > sickness that prevents a non-newbie kernel developer from raising 
> > > beyond churning out a flood of trivial patches and creating 
> > > unnecessary churn for other developers with these borderline 
> > > useless patches?
> > >
> > > Linux is a meritocracy, not a bureaucracy.
> > 
> > Good morning Ingo.
> > 
> > As you are a signer of that "code of conflict" patch,
> > I'll be mildly amused, but not surprised, if you are
> > among the first participants.
> 
> So as a reply to my joke directed against your (costly: see below) 
> flood of trivial and somewhat bureaucratic patches that PeterZ 
> complained about, which reply of mine aimed at getting you to change 
> from your many years old pattern of producing trivial patches towards 
> producing more substantial patches, causes you to issue a threat of 
> bureaucratic action against me?
> 
> Wow.
> 
> I'd also like to stress that I don't think you have answered PeterZ's 
> legitimate technical question adequately: what are the technological 
> justifications for doing this 25 patches series - returning 0/1 or 
> true/false is clearly a matter of taste unless mixed within the same 
> function. In fact what are your technological justifications for doing 
> so many trivial patches in general?
> 
> Please don't bother producing and sending me such trivial patches 
> unless they:
> 
>   - fix a real bug (in which case they are not trivial patches anymore)
> 
>   - or are part of a larger (non-trivial!) series that does some real,
>     substantial work on this code that tries to:
> 
>          - fix existing code
> 
>          - speed up existing code
> 
>          - or expand upon existing code with new code
> 
>          - turn totally unreadable code into something readable
>            (for example in drivers/staging/)
> 
> The reason I'm not applying your patch is that trivial patches, even 
> if they seem borderline useful, with no substance following them up, 
> often have more costs than benefits:
> 
>  - they lead to pointless churn:
> 
>     - they take up Git space (and bandwidth) for no good reason
> 
>     - they slow down bisection of real changes
> 
>     - they take up (valuable!) reviewer bandwidth
> 
>     - they take up maintainer bandwidth

Not to mention that one of your trivial patches in this series 
actually introduced a bug:

  lkml.kernel.org/r/1427867186.18175.60.camel@perches.com

Which additional risk adds to the cost side of the equation as well.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conflict (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
  2015-04-07  9:27           ` Ingo Molnar
@ 2015-04-07  9:36           ` Ingo Molnar
  2015-04-07  9:39             ` Ingo Molnar
  2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
  2015-04-07 12:35           ` Joe Perches
  3 siblings, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2015-04-07  9:36 UTC (permalink / raw)
  To: Joe Perches
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Greg Kroah-Hartman,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin


s/Conduct/Conflict

* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Joe Perches <joe@perches.com> wrote:
> 
> > On Tue, 2015-03-31 at 11:03 +0200, Ingo Molnar wrote:
> > > * Peter Zijlstra <peterz@infradead.org> wrote:
> > > > On Mon, Mar 30, 2015 at 04:46:17PM -0700, Joe Perches wrote:
> > > > > Use the normal return values for bool functions
> > > > > 
> > > > > Update the other sets of ret in try_wait_for_completion.
> > > > 
> > > > I'm missing a why; why are you doing this?
> > > 
> > > Let me guess: Joe Perches is suffering from 'trivialititis': a 
> > > sickness that prevents a non-newbie kernel developer from raising 
> > > beyond churning out a flood of trivial patches and creating 
> > > unnecessary churn for other developers with these borderline 
> > > useless patches?
> > >
> > > Linux is a meritocracy, not a bureaucracy.
> > 
> > Good morning Ingo.
> > 
> > As you are a signer of that "code of conflict" patch,
> > I'll be mildly amused, but not surprised, if you are
> > among the first participants.
> 
> So as a reply to my joke directed against your (costly: see below) 
> flood of trivial and somewhat bureaucratic patches that PeterZ 
> complained about, which reply of mine aimed at getting you to change 
> from your many years old pattern of producing trivial patches towards 
> producing more substantial patches, causes you to issue a threat of 
> bureaucratic action against me?
> 
> Wow.
> 
> I'd also like to stress that I don't think you have answered PeterZ's 
> legitimate technical question adequately: what are the technological 
> justifications for doing this 25 patches series - returning 0/1 or 
> true/false is clearly a matter of taste unless mixed within the same 
> function. In fact what are your technological justifications for doing 
> so many trivial patches in general?
> 
> Please don't bother producing and sending me such trivial patches 
> unless they:
> 
>   - fix a real bug (in which case they are not trivial patches anymore)
> 
>   - or are part of a larger (non-trivial!) series that does some real,
>     substantial work on this code that tries to:
> 
>          - fix existing code
> 
>          - speed up existing code
> 
>          - or expand upon existing code with new code
> 
>          - turn totally unreadable code into something readable
>            (for example in drivers/staging/)
> 
> The reason I'm not applying your patch is that trivial patches, even 
> if they seem borderline useful, with no substance following them up, 
> often have more costs than benefits:
> 
>  - they lead to pointless churn:
> 
>     - they take up Git space (and bandwidth) for no good reason
> 
>     - they slow down bisection of real changes
> 
>     - they take up (valuable!) reviewer bandwidth
> 
>     - they take up maintainer bandwidth
> 
> there's literally a million borderline pointless cleanup patches that 
> could be done on the kernel, and we really don't want to add a million 
> commits to the kernel tree...
> 
> I don't think your 25 patches long trivial series is defensible from a 
> kernel contributor who has thousands of commits in the mainline kernel 
> already: you are clearly not a kernel newbie anymore who needs to 
> learn the ropes through simple patches and whose initially trivial 
> patches maintainers will nurture in the hope of gaining a future 
> contributor who will be a net benefit in the future...
> 
> I also think you are beginning to abuse the openness of kernel 
> maintainers to apply trivial patches, and I don't think it's useful to 
> point out such abuse before it gets worse.
> 
> My (repeated) advice to you is that you should try to raise beyond 
> newbie patches and write something more substantial that helps Linux:
> 
>  - take a look at the many bugs on bugzilla.kernel.org and try to 
>    analyze, reproduce or fix them
> 
>  - go read kernel code, understand it and try to find real bugs.
> 
>  - go test the latest kernels and find bugs in it. The fresher the 
>    code, the more likely it is that it has bugs.
> 
>  - go read kernel code and try to expand upon it
> 
> Fortunately it's not hard to contribute to the kernel once you are 
> beyond the 'newbie' status: there's literally an infinite amount of 
> work to be done on the kernel, and I welcome productive contributions 
> - but churning out trivial patches with no substantial patches 
> following them up is not productive and in fact (as pointed out above) 
> they are harmful once you are not a totally fresh newbie kernel 
> developer anymore...
> 
> Pointing out this truth and protecting against such abusive flood of 
> trivial patches is not against the 'Code of Conflict' I signed.
> 
> Thanks,
> 
> 	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conflict (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
@ 2015-04-07  9:39             ` Ingo Molnar
  0 siblings, 0 replies; 71+ messages in thread
From: Ingo Molnar @ 2015-04-07  9:39 UTC (permalink / raw)
  To: Joe Perches
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Greg Kroah-Hartman,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin


* Ingo Molnar <mingo@kernel.org> wrote:

> > I also think you are beginning to abuse the openness of kernel 
> > maintainers to apply trivial patches, and I don't think it's 
> > useful to point out such abuse before it gets worse.

and this should read:

> > I also think you are beginning to abuse the openness of kernel 
> > maintainers to apply trivial patches, and I don't think it's 
> > harmful to point out such abuse before it gets worse.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
  2015-04-07  9:27           ` Ingo Molnar
  2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
@ 2015-04-07 11:00           ` Greg Kroah-Hartman
  2015-04-07 11:18             ` Ingo Molnar
  2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
  2015-04-07 12:35           ` Joe Perches
  3 siblings, 2 replies; 71+ messages in thread
From: Greg Kroah-Hartman @ 2015-04-07 11:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Joe Perches, Peter Zijlstra, linux-kernel, Ingo Molnar,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin

On Tue, Apr 07, 2015 at 11:12:46AM +0200, Ingo Molnar wrote:
> Pointing out this truth and protecting against such abusive flood of 
> trivial patches is not against the code of conduct I signed.

I totally agree, it's not "against" the code of conflict that I helped
write.

Joe, you know better than to send trivial stuff to maintainers who don't
want it.  Send it through the trivial maintainer for subsystems that
have expressed annoyance at this, it's not the first time this has
happened.

Some maintainers, like me, are fine with your types of patches, I'd
stick to those subsystems if you like doing this type of work.

Also, don't send stuff that is broken, that's not the sign of a trivial
patch :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
@ 2015-04-07 11:18             ` Ingo Molnar
  2015-04-07 11:27               ` Peter Zijlstra
  2015-04-07 13:21               ` about the flood of trivial patches and the Code of Conduct Peter Hurley
  2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
  1 sibling, 2 replies; 71+ messages in thread
From: Ingo Molnar @ 2015-04-07 11:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Joe Perches, Peter Zijlstra, linux-kernel, Ingo Molnar,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin


* Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Tue, Apr 07, 2015 at 11:12:46AM +0200, Ingo Molnar wrote:
> > Pointing out this truth and protecting against such abusive flood of 
> > trivial patches is not against the code of conduct I signed.
> 
> I totally agree, it's not "against" the code of conflict that I 
> helped write.
> 
> Joe, you know better than to send trivial stuff to maintainers who 
> don't want it.  Send it through the trivial maintainer for 
> subsystems that have expressed annoyance at this, it's not the first 
> time this has happened.

I argue that they should not be sent _at all_ in such cases, not even 
via the trivial tree: firstly because typically I'll pick up the bits 
from the trivial tree as well, and secondly because most of the 
arguments I listed against bulk trivial commits (weaker bisectability, 
taking up reviewer bandwidth, taking up Git space, etc.) still stand.

Frankly IMHO such a */25 series could be a net negative contribution 
when coming from a kernel contributor who has written 2000+ trivial 
patches already...

> Some maintainers, like me, are fine with your types of patches, I'd 
> stick to those subsystems if you like doing this type of work.

So sending trivial patches for things like totally unreadable code in 
say drivers/staging/ is probably OK, as they materially transform the 
code and make it more maintainable.

For the rest it can be more harmful than beneficial, for the reasons I 
outlined.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:18             ` Ingo Molnar
@ 2015-04-07 11:27               ` Peter Zijlstra
  2015-04-07 13:21               ` about the flood of trivial patches and the Code of Conduct Peter Hurley
  1 sibling, 0 replies; 71+ messages in thread
From: Peter Zijlstra @ 2015-04-07 11:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Greg Kroah-Hartman, Joe Perches, linux-kernel, Ingo Molnar,
	Linus Torvalds, Thomas Gleixner, H. Peter Anvin

On Tue, Apr 07, 2015 at 01:18:56PM +0200, Ingo Molnar wrote:
> 
> * Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> > On Tue, Apr 07, 2015 at 11:12:46AM +0200, Ingo Molnar wrote:
> > > Pointing out this truth and protecting against such abusive flood of 
> > > trivial patches is not against the code of conduct I signed.
> > 
> > I totally agree, it's not "against" the code of conflict that I 
> > helped write.
> > 
> > Joe, you know better than to send trivial stuff to maintainers who 
> > don't want it.  Send it through the trivial maintainer for 
> > subsystems that have expressed annoyance at this, it's not the first 
> > time this has happened.
> 
> I argue that they should not be sent _at all_ in such cases, not even 
> via the trivial tree: firstly because typically I'll pick up the bits 
> from the trivial tree as well, and secondly because most of the 
> arguments I listed against bulk trivial commits (weaker bisectability, 
> taking up reviewer bandwidth, taking up Git space, etc.) still stand.

I agree, I do not want actual code changes to by-pass me for the
subsystems I'm responsible for.

Typoes in comments I can live with, but I want to see each and every
patch that changes actual code.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
  2015-04-07 11:18             ` Ingo Molnar
@ 2015-04-07 11:28             ` Richard Weinberger
  2015-04-07 11:32               ` Peter Zijlstra
  1 sibling, 1 reply; 71+ messages in thread
From: Richard Weinberger @ 2015-04-07 11:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ingo Molnar, Joe Perches, Peter Zijlstra, LKML, Ingo Molnar,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin

On Tue, Apr 7, 2015 at 1:00 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Tue, Apr 07, 2015 at 11:12:46AM +0200, Ingo Molnar wrote:
>> Pointing out this truth and protecting against such abusive flood of
>> trivial patches is not against the code of conduct I signed.
>
> I totally agree, it's not "against" the code of conflict that I helped
> write.
>
> Joe, you know better than to send trivial stuff to maintainers who don't
> want it.  Send it through the trivial maintainer for subsystems that
> have expressed annoyance at this, it's not the first time this has
> happened.
>
> Some maintainers, like me, are fine with your types of patches, I'd
> stick to those subsystems if you like doing this type of work.

Can't we send all these kind of patches through the trivial tree?
Don't get me wrong, if you are fine with these patches that's you decision.
But other maintainers might think they have to take these patches and
get overloaded. I'm thinking of drivers maintainers that can only work
one or two hours per week on Linux.
Not everyone works full time on it like you.

I propose to send all this stuff though the trivial tree such that maintainers
of other subsystems have less workload and newbies (which are supposed
to send such patches) know which tree they have to work against.
Let's have to well defined and ordered. :-)

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
@ 2015-04-07 11:32               ` Peter Zijlstra
  2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
                                   ` (2 more replies)
  0 siblings, 3 replies; 71+ messages in thread
From: Peter Zijlstra @ 2015-04-07 11:32 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Greg Kroah-Hartman, Ingo Molnar, Joe Perches, LKML, Ingo Molnar,
	Linus Torvalds, Thomas Gleixner, H. Peter Anvin

On Tue, Apr 07, 2015 at 01:28:27PM +0200, Richard Weinberger wrote:
> Can't we send all these kind of patches through the trivial tree?
> Don't get me wrong, if you are fine with these patches that's you decision.
> But other maintainers might think they have to take these patches and
> get overloaded. I'm thinking of drivers maintainers that can only work
> one or two hours per week on Linux.
> Not everyone works full time on it like you.
> 
> I propose to send all this stuff though the trivial tree such that maintainers
> of other subsystems have less workload and newbies (which are supposed
> to send such patches) know which tree they have to work against.
> Let's have to well defined and ordered. :-)

As per the other branch of this tree; an emphatic NO to that. The
trivial tree is not a backdoor to bypass maintainers. Actual code
changes do not get to go through any tree but the maintainer tree unless
explicitly ACKed.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct
  2015-04-07 11:32               ` Peter Zijlstra
@ 2015-04-07 11:50                 ` Richard Weinberger
  2015-04-07 13:21                   ` Steven Rostedt
  2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
  2015-04-08  3:22                 ` Theodore Ts'o
  2 siblings, 1 reply; 71+ messages in thread
From: Richard Weinberger @ 2015-04-07 11:50 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Greg Kroah-Hartman, Ingo Molnar, Joe Perches, LKML, Ingo Molnar,
	Linus Torvalds, Thomas Gleixner, H. Peter Anvin

Am 07.04.2015 um 13:32 schrieb Peter Zijlstra:
> On Tue, Apr 07, 2015 at 01:28:27PM +0200, Richard Weinberger wrote:
>> Can't we send all these kind of patches through the trivial tree?
>> Don't get me wrong, if you are fine with these patches that's you decision.
>> But other maintainers might think they have to take these patches and
>> get overloaded. I'm thinking of drivers maintainers that can only work
>> one or two hours per week on Linux.
>> Not everyone works full time on it like you.
>>
>> I propose to send all this stuff though the trivial tree such that maintainers
>> of other subsystems have less workload and newbies (which are supposed
>> to send such patches) know which tree they have to work against.
>> Let's have to well defined and ordered. :-)
> 
> As per the other branch of this tree; an emphatic NO to that. The
> trivial tree is not a backdoor to bypass maintainers. Actual code
> changes do not get to go through any tree but the maintainer tree unless
> explicitly ACKed.

I agree that the series in question is useless.
But if a patch is trivial it can go through the trivial tree.
By trivial I really mean *trivial* in terms of typos
and 80 character limit crap.
It has to be something which does not hurt and the maintainer
can safely ignore.

Thanks,
//richard

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:32               ` Peter Zijlstra
  2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
@ 2015-04-07 12:31                 ` Rafael J. Wysocki
  2015-04-07 13:28                   ` Steven Rostedt
  2015-04-08  3:22                 ` Theodore Ts'o
  2 siblings, 1 reply; 71+ messages in thread
From: Rafael J. Wysocki @ 2015-04-07 12:31 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Richard Weinberger, Greg Kroah-Hartman, Ingo Molnar, Joe Perches,
	LKML, Ingo Molnar, Linus Torvalds, Thomas Gleixner,
	H. Peter Anvin

On Tuesday, April 07, 2015 01:32:12 PM Peter Zijlstra wrote:
> On Tue, Apr 07, 2015 at 01:28:27PM +0200, Richard Weinberger wrote:
> > Can't we send all these kind of patches through the trivial tree?
> > Don't get me wrong, if you are fine with these patches that's you decision.
> > But other maintainers might think they have to take these patches and
> > get overloaded. I'm thinking of drivers maintainers that can only work
> > one or two hours per week on Linux.
> > Not everyone works full time on it like you.
> > 
> > I propose to send all this stuff though the trivial tree such that maintainers
> > of other subsystems have less workload and newbies (which are supposed
> > to send such patches) know which tree they have to work against.
> > Let's have to well defined and ordered. :-)
> 
> As per the other branch of this tree; an emphatic NO to that. The
> trivial tree is not a backdoor to bypass maintainers. Actual code
> changes do not get to go through any tree but the maintainer tree unless
> explicitly ACKed.

Well, practically speaking, that would make changes like the recent
clockevents_notify() removal very difficult to carry out.  Also there is
some natural cross-talk between certain subsystems.

Different matter is the real value of tree-wide cleanup changes.  If code is
old enough it often is better to leave it alone, even though it may be doing
things that we don't usually do nowadays.

Or things that new patches are not supposed to do, for that matter, so
I generally don't like the "checkpatch.pl error fix" changes in the old code.

Rafael


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
                             ` (2 preceding siblings ...)
  2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
@ 2015-04-07 12:35           ` Joe Perches
  3 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-04-07 12:35 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Greg Kroah-Hartman,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin

On Tue, 2015-04-07 at 11:12 +0200, Ingo Molnar wrote:
> I don't think you have answered PeterZ's 
> legitimate technical question adequately:

As I wrote before, ~13000:180 is a big ratio.
http://www.kernelhub.org/?p=2&msg=718145

> what are the technological 
> justifications for doing this 25 patches series - returning 0/1 or 
> true/false is clearly a matter of taste unless mixed within the same 
> function.

I presume you mean file rather than function.

21 of the 55 files modified already used "return true"
or "return false" for other bool function returns.

Many of the 1/0 uses were in functions where the
function return type was changed from int to bool but
the return statements were unchanged.

Expectation and consistency matter.
To what degree is, as always, debatable.

Code that causes a reader to "stall" when reading is
generally not good.  

Patches that span subsystems, given the distribution
of interest and responsibilities in the kernel,
generally aren't possible to apply by any single
maintainer.

It's generally necessary to split even these admittedly
trivial patches by area of maintainership.

Bypassing actual maintainers by sending only to the
nominal trivial maintainer isn't good.

> In fact what are your technological justifications for doing 
> so many trivial patches in general?

Consistency improves reading speed and can help reduce
future defects.

> Please don't bother producing and sending me such trivial patches

My creation of these types of patches either singly
or in a series is fairly automated.

I will sed your name and email address out of the
scripts that generate the "To:" and "CC:" lists for
patches in the future.

If any other person with a MAINTAINERS entry wants not
to receive these types of patches from me, please let
me know privately.

> Pointing out this truth and protecting against such abusive flood of 
> trivial patches is not against the code of conduct I signed.

Jokes are hard.
"Be excellent to each other" can be too, but shouldn't be.
Manners and civility are important.
Yours, like mine, can always be improved.
We all should strive for that improvement.

cheers, Joe


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct
  2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
@ 2015-04-07 13:21                   ` Steven Rostedt
  2015-04-07 13:28                     ` Richard Weinberger
  0 siblings, 1 reply; 71+ messages in thread
From: Steven Rostedt @ 2015-04-07 13:21 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Peter Zijlstra, Greg Kroah-Hartman, Ingo Molnar, Joe Perches,
	LKML, Ingo Molnar, Linus Torvalds, Thomas Gleixner,
	H. Peter Anvin

On Tue, Apr 07, 2015 at 01:50:31PM +0200, Richard Weinberger wrote:
> > 
> > As per the other branch of this tree; an emphatic NO to that. The
> > trivial tree is not a backdoor to bypass maintainers. Actual code
> > changes do not get to go through any tree but the maintainer tree unless
> > explicitly ACKed.
> 
> I agree that the series in question is useless.
> But if a patch is trivial it can go through the trivial tree.

Only if they received an Acked-by from the maintainer of the code that 
it touches. That way, Peter does see the code that is changing. He doesn't
need to take it through his tree, but the trivial maintainer must get his
Acked-by, which shows that he did actually take a look at the patch and is
fine with it going through another route.


> By trivial I really mean *trivial* in terms of typos
> and 80 character limit crap.

Egad no. The 80 character limit is a guideline not set in stone. There's so
many times I see people break up lines to avoid that limit and make the
code uglier and more difficult to read. Again, that's a trivial change that
would do more harm than good.

> It has to be something which does not hurt and the maintainer
> can safely ignore.

I think the only change that could probably go in without an ack from the
maintainer is a change that Peter already mentioned. Typos in comments that
do not touch the actual code.

-- Steve

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct
  2015-04-07 11:18             ` Ingo Molnar
  2015-04-07 11:27               ` Peter Zijlstra
@ 2015-04-07 13:21               ` Peter Hurley
  1 sibling, 0 replies; 71+ messages in thread
From: Peter Hurley @ 2015-04-07 13:21 UTC (permalink / raw)
  To: Ingo Molnar, Greg Kroah-Hartman, Joe Perches
  Cc: Peter Zijlstra, linux-kernel, Ingo Molnar, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, H. Peter Anvin

On 04/07/2015 07:18 AM, Ingo Molnar wrote:
> * Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
>> On Tue, Apr 07, 2015 at 11:12:46AM +0200, Ingo Molnar wrote:
>>> Pointing out this truth and protecting against such abusive flood of 
>>> trivial patches is not against the code of conduct I signed.
>>
>> I totally agree, it's not "against" the code of conflict that I 
>> helped write.
>>
>> Joe, you know better than to send trivial stuff to maintainers who 
>> don't want it.  Send it through the trivial maintainer for 
>> subsystems that have expressed annoyance at this, it's not the first 
>> time this has happened.
> 
> I argue that they should not be sent _at all_ in such cases, not even 
> via the trivial tree: firstly because typically I'll pick up the bits 
> from the trivial tree as well, and secondly because most of the 
> arguments I listed against bulk trivial commits (weaker bisectability, 
> taking up reviewer bandwidth, taking up Git space, etc.) still stand.

And requires backports for -stable.

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
@ 2015-04-07 13:28                   ` Steven Rostedt
  2015-04-08 23:37                     ` Rafael J. Wysocki
  0 siblings, 1 reply; 71+ messages in thread
From: Steven Rostedt @ 2015-04-07 13:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Peter Zijlstra, Richard Weinberger, Greg Kroah-Hartman,
	Ingo Molnar, Joe Perches, LKML, Ingo Molnar, Linus Torvalds,
	Thomas Gleixner, H. Peter Anvin

On Tue, Apr 07, 2015 at 02:31:23PM +0200, Rafael J. Wysocki wrote:
> > 
> > As per the other branch of this tree; an emphatic NO to that. The
> > trivial tree is not a backdoor to bypass maintainers. Actual code
> > changes do not get to go through any tree but the maintainer tree unless
> > explicitly ACKed.
> 
> Well, practically speaking, that would make changes like the recent
> clockevents_notify() removal very difficult to carry out.  Also there is
> some natural cross-talk between certain subsystems.

I would not call the clockevents_notify() series "trivial". More advanced
clean ups that are system wide, would be different, because you are changing
the way the code works. The maintainers must be Cc'd, but sometimes I find
those changes are very hard to get acks from everyone. But again, the change
is a non trivial clean up and has other reasons for going in than just to
make the code look nice.

> 
> Different matter is the real value of tree-wide cleanup changes.  If code is
> old enough it often is better to leave it alone, even though it may be doing
> things that we don't usually do nowadays.

Or maybe it's a good time to rewrite that code such that everyone can understand
it today ;-)

> 
> Or things that new patches are not supposed to do, for that matter, so
> I generally don't like the "checkpatch.pl error fix" changes in the old code.
>

I totally agree with that. But for non trivial clean ups, old code should be
updated too.

-- Steve
 

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct
  2015-04-07 13:21                   ` Steven Rostedt
@ 2015-04-07 13:28                     ` Richard Weinberger
  0 siblings, 0 replies; 71+ messages in thread
From: Richard Weinberger @ 2015-04-07 13:28 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Peter Zijlstra, Greg Kroah-Hartman, Ingo Molnar, Joe Perches,
	LKML, Ingo Molnar, Linus Torvalds, Thomas Gleixner,
	H. Peter Anvin

Am 07.04.2015 um 15:21 schrieb Steven Rostedt:
> On Tue, Apr 07, 2015 at 01:50:31PM +0200, Richard Weinberger wrote:
>>>
>>> As per the other branch of this tree; an emphatic NO to that. The
>>> trivial tree is not a backdoor to bypass maintainers. Actual code
>>> changes do not get to go through any tree but the maintainer tree unless
>>> explicitly ACKed.
>>
>> I agree that the series in question is useless.
>> But if a patch is trivial it can go through the trivial tree.
> 
> Only if they received an Acked-by from the maintainer of the code that 
> it touches. That way, Peter does see the code that is changing. He doesn't
> need to take it through his tree, but the trivial maintainer must get his
> Acked-by, which shows that he did actually take a look at the patch and is
> fine with it going through another route.
> 
> 
>> By trivial I really mean *trivial* in terms of typos
>> and 80 character limit crap.
> 
> Egad no. The 80 character limit is a guideline not set in stone. There's so
> many times I see people break up lines to avoid that limit and make the
> code uglier and more difficult to read. Again, that's a trivial change that
> would do more harm than good.

That's why i named it crap. :D

>> It has to be something which does not hurt and the maintainer
>> can safely ignore.
> 
> I think the only change that could probably go in without an ack from the
> maintainer is a change that Peter already mentioned. Typos in comments that
> do not touch the actual code.

Agreed.

Thanks,
//richard

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 11:32               ` Peter Zijlstra
  2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
  2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
@ 2015-04-08  3:22                 ` Theodore Ts'o
  2 siblings, 0 replies; 71+ messages in thread
From: Theodore Ts'o @ 2015-04-08  3:22 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Richard Weinberger, Greg Kroah-Hartman, Ingo Molnar, Joe Perches,
	LKML, Ingo Molnar, Linus Torvalds, Thomas Gleixner,
	H. Peter Anvin

On Tue, Apr 07, 2015 at 01:32:12PM +0200, Peter Zijlstra wrote:
> > I propose to send all this stuff though the trivial tree such that maintainers
> > of other subsystems have less workload and newbies (which are supposed
> > to send such patches) know which tree they have to work against.
> > Let's have to well defined and ordered. :-)
> 
> As per the other branch of this tree; an emphatic NO to that. The
> trivial tree is not a backdoor to bypass maintainers. Actual code
> changes do not get to go through any tree but the maintainer tree unless
> explicitly ACKed.

Agreed, I don't want trivial patches to ext4 either (a) polluting my
inbox, or (b) sneaking in behind my back in the trivial tree.

Joe, please just stop the madness.

Thanks,

						- Ted

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-07 13:28                   ` Steven Rostedt
@ 2015-04-08 23:37                     ` Rafael J. Wysocki
  2015-04-09  0:04                       ` Joe Perches
  2015-04-13 12:17                       ` One Thousand Gnomes
  0 siblings, 2 replies; 71+ messages in thread
From: Rafael J. Wysocki @ 2015-04-08 23:37 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Peter Zijlstra, Richard Weinberger, Greg Kroah-Hartman,
	Ingo Molnar, Joe Perches, LKML, Ingo Molnar, Linus Torvalds,
	Thomas Gleixner, H. Peter Anvin

On Tuesday, April 07, 2015 09:28:03 AM Steven Rostedt wrote:
> On Tue, Apr 07, 2015 at 02:31:23PM +0200, Rafael J. Wysocki wrote:
> > > 
> > > As per the other branch of this tree; an emphatic NO to that. The
> > > trivial tree is not a backdoor to bypass maintainers. Actual code
> > > changes do not get to go through any tree but the maintainer tree unless
> > > explicitly ACKed.
> > 
> > Well, practically speaking, that would make changes like the recent
> > clockevents_notify() removal very difficult to carry out.  Also there is
> > some natural cross-talk between certain subsystems.
> 
> I would not call the clockevents_notify() series "trivial". More advanced
> clean ups that are system wide, would be different, because you are changing
> the way the code works. The maintainers must be Cc'd, but sometimes I find
> those changes are very hard to get acks from everyone. But again, the change
> is a non trivial clean up and has other reasons for going in than just to
> make the code look nice.
> 
> > 
> > Different matter is the real value of tree-wide cleanup changes.  If code is
> > old enough it often is better to leave it alone, even though it may be doing
> > things that we don't usually do nowadays.
> 
> Or maybe it's a good time to rewrite that code such that everyone can understand
> it today ;-)
> 
> > 
> > Or things that new patches are not supposed to do, for that matter, so
> > I generally don't like the "checkpatch.pl error fix" changes in the old code.
> >
> 
> I totally agree with that. But for non trivial clean ups, old code should be
> updated too.

Well, there still is some risk of introducing real bugs this way (I *have* seen
"trivial cleanups" that broke things) and is it really worth it?

Besides, old code is somewhat like an ancient building.  Yes, it needs to be
kept in a good shape, but you won't replace bricks in it just because they are
old, will you?

Rafael


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-08 23:37                     ` Rafael J. Wysocki
@ 2015-04-09  0:04                       ` Joe Perches
  2015-04-13 12:17                       ` One Thousand Gnomes
  1 sibling, 0 replies; 71+ messages in thread
From: Joe Perches @ 2015-04-09  0:04 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Steven Rostedt, Peter Zijlstra, Richard Weinberger,
	Greg Kroah-Hartman, Ingo Molnar, LKML, Ingo Molnar,
	Linus Torvalds, Thomas Gleixner, H. Peter Anvin

On Thu, 2015-04-09 at 01:37 +0200, Rafael J. Wysocki wrote:
> old code is somewhat like an ancient building.  Yes, it needs to be
> kept in a good shape, but you won't replace bricks in it just because they are
> old, will you?

No, but you do have to replace/repoint the mortar
as it ages.

Here in SoCal, we also have to do structural work
on UnReinforced Masonry (URM) buildings to avoid
loss of life when the ground moves underneath us.

A small story:

There's a guy a few blocks from me that wants to
open a restaurant in a ~70 year old building.  He's
been fighting the city permitting process for over
a year now because he rented a well built, but old,
URM building with double courses of brick walls
that had already had some structural improvements.

http://la.eater.com/2014/3/18/6260975/brixton-restaurant-going-into-the-joker-in-santa-monica

He added some windows where previously windows had
been located but also had been covered and filled-in
with over time.  The place had been a dark, smoky
dive bar.

City went into a mode where any change to the
building was unacceptable unless _every_ element
of the building was brought up to new construction
standards.

It's a silly and expensive process for him and an
overall loss for the city because of delays in
creation of a tax-paying business.

Santa Monica, my home town...

Anyway, code isn't a lot like a building.

It's easy to prove that some source code change
doesn't cause a change in object output.

It's not so easy in a physical structure.


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0)
  2015-04-08 23:37                     ` Rafael J. Wysocki
  2015-04-09  0:04                       ` Joe Perches
@ 2015-04-13 12:17                       ` One Thousand Gnomes
  1 sibling, 0 replies; 71+ messages in thread
From: One Thousand Gnomes @ 2015-04-13 12:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Steven Rostedt, Peter Zijlstra, Richard Weinberger,
	Greg Kroah-Hartman, Ingo Molnar, Joe Perches, LKML, Ingo Molnar,
	Linus Torvalds, Thomas Gleixner, H. Peter Anvin

> Besides, old code is somewhat like an ancient building.  Yes, it needs to be
> kept in a good shape, but you won't replace bricks in it just because they are
> old, will you?

When they matter to the integrity and they are likely to be full of
internal cracks and holes you do.

What concerns me more is that we now have lots of old driver code in the
kernel that nobody uses, that nobody cares about in reality but which has
been turd polished to the point that at casual glance it looks maintained
and useful but probably hasn't been tested in years.

Alan


^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2015-04-13 12:19 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 23:45 [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0 Joe Perches
2015-03-30 23:45 ` [PATCH 01/25] arm: " Joe Perches
2015-03-31 15:54   ` Tony Lindgren
2015-03-31 15:58   ` Paolo Bonzini
2015-03-31 16:05     ` Marc Zyngier
2015-03-30 23:46 ` [PATCH 02/25] arm64: " Joe Perches
2015-03-31 15:29   ` Will Deacon
2015-03-30 23:46 ` [PATCH 03/25] hexagon: " Joe Perches
2015-03-30 23:46 ` [PATCH 04/25] ia64: " Joe Perches
2015-03-30 23:46 ` [PATCH 05/25] mips: " Joe Perches
2015-03-30 23:46 ` [PATCH 06/25] powerpc: " Joe Perches
2015-03-31  1:49   ` Benjamin Herrenschmidt
2015-03-31  1:57     ` Joe Perches
2015-03-30 23:46 ` [PATCH 07/25] s390: " Joe Perches
2015-03-31  7:13   ` Heiko Carstens
2015-03-30 23:46 ` [PATCH 08/25] sparc: " Joe Perches
2015-03-30 23:46 ` [PATCH 09/25] tile: " Joe Perches
2015-03-30 23:46 ` [PATCH 10/25] unicore32: " Joe Perches
2015-03-30 23:46 ` [PATCH 11/25] x86: " Joe Perches
2015-03-31 16:05   ` Paolo Bonzini
2015-03-30 23:46 ` [PATCH 12/25] virtio_console: " Joe Perches
2015-03-31  5:32   ` Amit Shah
2015-03-30 23:46 ` [PATCH 13/25] csiostor: " Joe Perches
2015-03-30 23:46 ` [PATCH 14/25] dcache: " Joe Perches
2015-03-30 23:46 ` [PATCH 15/25] nfsd: nfs4state: " Joe Perches
2015-03-30 23:46 ` [PATCH 16/25] include/linux: " Joe Perches
2015-03-31  7:41   ` Lee Jones
2015-04-06 19:39   ` Sebastian Reichel
2015-03-30 23:46 ` [PATCH 17/25] sound: " Joe Perches
2015-03-31  7:11   ` Mark Brown
2015-03-30 23:46 ` [PATCH 18/25] rcu: tree_plugin: " Joe Perches
2015-03-30 23:46 ` [PATCH 19/25] sched: " Joe Perches
2015-03-31  8:53   ` Peter Zijlstra
2015-03-31  9:03     ` Ingo Molnar
2015-03-31 16:46       ` Joe Perches
2015-04-01  6:58         ` Peter Zijlstra
2015-04-07  9:12         ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Ingo Molnar
2015-04-07  9:27           ` Ingo Molnar
2015-04-07  9:36           ` about the flood of trivial patches and the Code of Conflict " Ingo Molnar
2015-04-07  9:39             ` Ingo Molnar
2015-04-07 11:00           ` about the flood of trivial patches and the Code of Conduct " Greg Kroah-Hartman
2015-04-07 11:18             ` Ingo Molnar
2015-04-07 11:27               ` Peter Zijlstra
2015-04-07 13:21               ` about the flood of trivial patches and the Code of Conduct Peter Hurley
2015-04-07 11:28             ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Richard Weinberger
2015-04-07 11:32               ` Peter Zijlstra
2015-04-07 11:50                 ` about the flood of trivial patches and the Code of Conduct Richard Weinberger
2015-04-07 13:21                   ` Steven Rostedt
2015-04-07 13:28                     ` Richard Weinberger
2015-04-07 12:31                 ` about the flood of trivial patches and the Code of Conduct (was: Re: [PATCH 19/25] sched: Use bool function return values of true/false not 1/0) Rafael J. Wysocki
2015-04-07 13:28                   ` Steven Rostedt
2015-04-08 23:37                     ` Rafael J. Wysocki
2015-04-09  0:04                       ` Joe Perches
2015-04-13 12:17                       ` One Thousand Gnomes
2015-04-08  3:22                 ` Theodore Ts'o
2015-04-07 12:35           ` Joe Perches
2015-03-31  9:09     ` [PATCH 19/25] sched: Use bool function return values of true/false not 1/0 Joe Perches
2015-04-01  5:17   ` Jason Low
2015-04-01  5:46     ` [PATCH V2 " Joe Perches
2015-03-30 23:46 ` [PATCH 20/25] ftrace: " Joe Perches
2015-03-30 23:46 ` [PATCH 21/25] slub: " Joe Perches
2015-04-01  3:29   ` David Rientjes
2015-03-30 23:46 ` [PATCH 22/25] bridge: " Joe Perches
2015-03-30 23:46 ` [PATCH 23/25] netfilter: " Joe Perches
2015-03-31 16:58   ` Pablo Neira Ayuso
2015-03-30 23:46 ` [PATCH 24/25] security: " Joe Perches
2015-03-31  6:03   ` John Johansen
2015-03-30 23:46 ` [PATCH 25/25] sound: wm5100-tables: " Joe Perches
2015-04-01 11:54   ` Charles Keepax
2015-03-31  0:07 ` [PATCH 00/25] treewide: " Casey Schaufler
2015-03-31  0:14   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).