[alsa-devel] [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0
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(-)
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,
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).
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; } }
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
participants (3)
-
Charles Keepax
-
Joe Perches
-
Mark Brown