Skip to contentSkip to conversation

ASoC: codecs: use true and false for boolean values

PATCH In review Gustavo A. R. Silva 3 participants 27 messages Aug 4, 2018 – Aug 6, 2018

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover ASoC: codecs: use true and false for boolean values

Hi all,

This patchset aims to replace the use of integer values with a proper true or false in return statements for functions returning bool.

Thanks

Gustavo A. R. Silva (12):
ASoC: max9850: use true and false for boolean values
ASoC: rt5631: use true and false for boolean values
ASoC: tda7419: use true and false for boolean values
ASoC: wm8990: use true and false for boolean values
ASoC: cs4270: use true and false for boolean values
ASoC: wm8996: use true and false for boolean values
ASoC: da7219: use true and false for boolean values
ASoC: twl6040: use true and false for boolean values
ASoC: da7213: use true and false for boolean values
ASoC: wm5100-tables: use true and false for boolean values
ASoC: da9055: use true and false for boolean values
ASoC: wm8903: use true and false for boolean values

 sound/soc/codecs/cs4270.c        |  2 +-
 sound/soc/codecs/da7213.c        |  4 ++--
 sound/soc/codecs/da7219.c        |  4 ++--
 sound/soc/codecs/da9055.c        |  4 ++--
 sound/soc/codecs/max9850.c       |  4 ++--
 sound/soc/codecs/rt5631.c        |  8 ++++----
 sound/soc/codecs/tda7419.c       |  4 ++--
 sound/soc/codecs/twl6040.c       |  2 +-
 sound/soc/codecs/wm5100-tables.c | 12 ++++++------
 sound/soc/codecs/wm8903.c        |  4 ++--
 sound/soc/codecs/wm8990.c        |  4 ++--
 sound/soc/codecs/wm8996.c        |  8 ++++----
 12 files changed, 30 insertions(+), 30 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/12 ASoC: max9850: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/max9850.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/max9850.c +2 -2
index 74d7f52..6e61345 100644
@@ -52,9 +52,9 @@ static bool max9850_volatile_register(struct device *dev, unsigned int reg)
 	switch (reg) {
 	case MAX9850_STATUSA:
 	case MAX9850_STATUSB:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Applied "ASoC: max9850: use true and false for boolean values" to the asoc tree

The patch

ASoC: max9850: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 038541dae968dbef99edca4b22bbb2a7b4afdc83 Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:49:02 -0500
Subject: [PATCH] ASoC: max9850: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/max9850.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/max9850.c +2 -2
index 74d7f52c7e73..6e6134589588 100644
@@ -52,9 +52,9 @@ static bool max9850_volatile_register(struct device *dev, unsigned int reg)
 	switch (reg) {
 	case MAX9850_STATUSA:
 	case MAX9850_STATUSB:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#3 lore raw

PATCH 2/12 ASoC: rt5631: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/rt5631.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5631.c +4 -4
index e52e467..865f49a 100644
@@ -105,9 +105,9 @@ static bool rt5631_volatile_register(struct device *dev, unsigned int reg)
 	case RT5631_INDEX_ADD:
 	case RT5631_INDEX_DATA:
 	case RT5631_EQ_CTRL:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
@@ -164,9 +164,9 @@ static bool rt5631_readable_register(struct device *dev, unsigned int reg)
 	case RT5631_VENDOR_ID:
 	case RT5631_VENDOR_ID1:
 	case RT5631_VENDOR_ID2:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#4 lore raw

Applied "ASoC: rt5631: use true and false for boolean values" to the asoc tree

The patch

ASoC: rt5631: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 508e8641f89cc89554adbec3ce59bcd28a4ced4b Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:49:55 -0500
Subject: [PATCH] ASoC: rt5631: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/rt5631.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5631.c +4 -4
index e52e4670cf65..865f49ac38dd 100644
@@ -105,9 +105,9 @@ static bool rt5631_volatile_register(struct device *dev, unsigned int reg)
 	case RT5631_INDEX_ADD:
 	case RT5631_INDEX_DATA:
 	case RT5631_EQ_CTRL:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
@@ -164,9 +164,9 @@ static bool rt5631_readable_register(struct device *dev, unsigned int reg)
 	case RT5631_VENDOR_ID:
 	case RT5631_VENDOR_ID1:
 	case RT5631_VENDOR_ID2:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#5 lore raw

PATCH 3/12 ASoC: tda7419: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/tda7419.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/tda7419.c +2 -2
index 225c210..7f3b79c 100644
@@ -142,9 +142,9 @@ struct tda7419_vol_control {
 static inline bool tda7419_vol_is_stereo(struct tda7419_vol_control *tvc)
 {
 	if (tvc->reg == tvc->rreg)
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 static int tda7419_vol_info(struct snd_kcontrol *kcontrol,
Signature · 1 line
2.7.4
#6 lore raw

PATCH 4/12 ASoC: wm8990: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8990.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8990.c +2 -2
index 411b9ee..457bc43 100644
@@ -40,9 +40,9 @@ static bool wm8990_volatile_register(struct device *dev, unsigned int reg)
 {
 	switch (reg) {
 	case WM8990_RESET:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#8 lore raw

Applied "ASoC: wm8990: use true and false for boolean values" to the asoc tree

In reply to Gustavo A. R. Silva

The patch

ASoC: wm8990: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 064ee5a370150534e12e5bac4ff81f86528e27ca Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:51:01 -0500
Subject: [PATCH] ASoC: wm8990: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8990.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8990.c +2 -2
index 411b9eee88c2..457bc437ce54 100644
@@ -40,9 +40,9 @@ static bool wm8990_volatile_register(struct device *dev, unsigned int reg)
 {
 	switch (reg) {
 	case WM8990_RESET:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#9 lore raw

PATCH 5/12 ASoC: cs4270: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/cs4270.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs4270.c +1 -1
index 2a7a416..3c266ee 100644
@@ -219,7 +219,7 @@ static bool cs4270_reg_is_volatile(struct device *dev, unsigned int reg)
 {
 	/* Unreadable registers are considered volatile */
 	if ((reg < CS4270_FIRSTREG) || (reg > CS4270_LASTREG))
-		return 1;
+		return true;
 
 	return reg == CS4270_CHIPID;
 }
Signature · 1 line
2.7.4
maintainer
#10 lore raw

Applied "ASoC: cs4270: use true and false for boolean values" to the asoc tree

The patch

ASoC: cs4270: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From c34c4515286f27e7e99d8a0011b4322d1de6c9bc Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:52:01 -0500
Subject: [PATCH] ASoC: cs4270: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/cs4270.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs4270.c +1 -1
index 2a7a4168c072..3c266eeb89bf 100644
@@ -219,7 +219,7 @@ static bool cs4270_reg_is_volatile(struct device *dev, unsigned int reg)
 {
 	/* Unreadable registers are considered volatile */
 	if ((reg < CS4270_FIRSTREG) || (reg > CS4270_LASTREG))
-		return 1;
+		return true;
 
 	return reg == CS4270_CHIPID;
 }
Signature · 1 line
2.18.0
#11 lore raw

PATCH 6/12 ASoC: wm8996: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8996.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8996.c +4 -4
index 78a4082..91711f8 100644
@@ -1498,9 +1498,9 @@ static bool wm8996_readable_register(struct device *dev, unsigned int reg)
 	case WM8996_RIGHT_PDM_SPEAKER:
 	case WM8996_PDM_SPEAKER_MUTE_SEQUENCE:
 	case WM8996_PDM_SPEAKER_VOLUME:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
@@ -1522,9 +1522,9 @@ static bool wm8996_volatile_register(struct device *dev, unsigned int reg)
 	case WM8996_MIC_DETECT_3:
 	case WM8996_HEADPHONE_DETECT_1:
 	case WM8996_HEADPHONE_DETECT_2:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#13 lore raw

Applied "ASoC: wm8996: use true and false for boolean values" to the asoc tree

In reply to Gustavo A. R. Silva

The patch

ASoC: wm8996: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From eb086306bc6b42dc2c538ec2350d44a82d1a835b Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:52:35 -0500
Subject: [PATCH] ASoC: wm8996: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8996.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8996.c +4 -4
index 78a408236cfb..91711f8958c5 100644
@@ -1498,9 +1498,9 @@ static bool wm8996_readable_register(struct device *dev, unsigned int reg)
 	case WM8996_RIGHT_PDM_SPEAKER:
 	case WM8996_PDM_SPEAKER_MUTE_SEQUENCE:
 	case WM8996_PDM_SPEAKER_VOLUME:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
@@ -1522,9 +1522,9 @@ static bool wm8996_volatile_register(struct device *dev, unsigned int reg)
 	case WM8996_MIC_DETECT_3:
 	case WM8996_HEADPHONE_DETECT_1:
 	case WM8996_HEADPHONE_DETECT_2:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#14 lore raw

PATCH 7/12 ASoC: da7219: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da7219.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da7219.c +2 -2
index 980a6a8..c0144f2 100644
@@ -2143,9 +2143,9 @@ static bool da7219_volatile_register(struct device *dev, unsigned int reg)
 	case DA7219_ACCDET_IRQ_EVENT_B:
 	case DA7219_ACCDET_CONFIG_8:
 	case DA7219_SYSTEM_STATUS:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#15 lore raw

Applied "ASoC: da7219: use true and false for boolean values" to the asoc tree

The patch

ASoC: da7219: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 965afd3c1dbaf293bfa9452aaf0a7e53d78d07f3 Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:53:10 -0500
Subject: [PATCH] ASoC: da7219: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da7219.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da7219.c +2 -2
index 980a6a8bf56d..c0144f2f8174 100644
@@ -2143,9 +2143,9 @@ static bool da7219_volatile_register(struct device *dev, unsigned int reg)
 	case DA7219_ACCDET_IRQ_EVENT_B:
 	case DA7219_ACCDET_CONFIG_8:
 	case DA7219_SYSTEM_STATUS:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#16 lore raw

PATCH 8/12 ASoC: twl6040: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/twl6040.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/twl6040.c +1 -1
index bfd1abd..94675da 100644
@@ -148,7 +148,7 @@ static bool twl6040_can_write_to_chip(struct snd_soc_component *component,
 	case TWL6040_REG_HFRCTL:
 		return priv->dl2_unmuted;
 	default:
-		return 1;
+		return true;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#17 lore raw

Applied "ASoC: twl6040: use true and false for boolean values" to the asoc tree

The patch

ASoC: twl6040: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From bc94c8884e5a94914ec950dfc615563a1253e3f3 Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:53:38 -0500
Subject: [PATCH] ASoC: twl6040: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/twl6040.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/twl6040.c +1 -1
index bfd1abd72253..94675da514c8 100644
@@ -148,7 +148,7 @@ static bool twl6040_can_write_to_chip(struct snd_soc_component *component,
 	case TWL6040_REG_HFRCTL:
 		return priv->dl2_unmuted;
 	default:
-		return 1;
+		return true;
 	}
 }
 
Signature · 1 line
2.18.0
#18 lore raw

PATCH 9/12 ASoC: da7213: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da7213.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da7213.c +2 -2
index 54cb5f2..92d006a 100644
@@ -1140,9 +1140,9 @@ static bool da7213_volatile_register(struct device *dev, unsigned int reg)
 	case DA7213_ALC_OFFSET_AUTO_M_R:
 	case DA7213_ALC_OFFSET_AUTO_U_R:
 	case DA7213_ALC_CIC_OP_LVL_DATA:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#19 lore raw

Applied "ASoC: da7213: use true and false for boolean values" to the asoc tree

The patch

ASoC: da7213: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 1752a35acd8e837463fb7b7d9492b18e2a2ed5e3 Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:54:10 -0500
Subject: [PATCH] ASoC: da7213: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da7213.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da7213.c +2 -2
index 54cb5f24969f..92d006a5283e 100644
@@ -1140,9 +1140,9 @@ static bool da7213_volatile_register(struct device *dev, unsigned int reg)
 	case DA7213_ALC_OFFSET_AUTO_M_R:
 	case DA7213_ALC_OFFSET_AUTO_U_R:
 	case DA7213_ALC_CIC_OP_LVL_DATA:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#20 lore raw

PATCH 10/12 ASoC: wm5100-tables: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm5100-tables.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/wm5100-tables.c +6 -6
index e239f4b..9e987cf 100644
@@ -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;
 	}
 }
 
Signature · 1 line
2.7.4
#22 lore raw

PATCH 11/12 ASoC: da9055: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da9055.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da9055.c +2 -2
index afdf90c..f6a7bf9 100644
@@ -1041,9 +1041,9 @@ static bool da9055_volatile_register(struct device *dev,
 	case DA9055_HP_R_GAIN_STATUS:
 	case DA9055_LINE_GAIN_STATUS:
 	case DA9055_ALC_CIC_OP_LVL_DATA:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#23 lore raw

Applied "ASoC: da9055: use true and false for boolean values" to the asoc tree

The patch

ASoC: da9055: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From e1ec62b147c2f2deae66e69ee4f7347dc80123ae Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:55:28 -0500
Subject: [PATCH] ASoC: da9055: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/da9055.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/da9055.c +2 -2
index afdf90c78884..f6a7bf9560e7 100644
@@ -1041,9 +1041,9 @@ static bool da9055_volatile_register(struct device *dev,
 	case DA9055_HP_R_GAIN_STATUS:
 	case DA9055_LINE_GAIN_STATUS:
 	case DA9055_ALC_CIC_OP_LVL_DATA:
-		return 1;
+		return true;
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0
#24 lore raw

PATCH 12/12 ASoC: wm8903: use true and false for boolean values

In reply to Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8903.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8903.c +2 -2
index 7b8b6ef..6cb3c15 100644
@@ -251,10 +251,10 @@ static bool wm8903_volatile_register(struct device *dev, unsigned int reg)
 	case WM8903_DC_SERVO_READBACK_2:
 	case WM8903_DC_SERVO_READBACK_3:
 	case WM8903_DC_SERVO_READBACK_4:
-		return 1;
+		return true;
 
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.7.4
maintainer
#26 lore raw

Applied "ASoC: wm8903: use true and false for boolean values" to the asoc tree

In reply to Gustavo A. R. Silva

The patch

ASoC: wm8903: use true and false for boolean values

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From bee7d3c9f89a1bbe3d5f88ac9d6946de4705731b Mon Sep 17 00:00:00 2001

From: "Gustavo A. R. Silva" <[email protected]>
Date: Sat, 4 Aug 2018 16:56:02 -0500
Subject: [PATCH] ASoC: wm8903: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This code was detected with the help of Coccinelle.

---
 sound/soc/codecs/wm8903.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8903.c +2 -2
index 7b8b6ef2f632..6cb3c153ba19 100644
@@ -251,10 +251,10 @@ static bool wm8903_volatile_register(struct device *dev, unsigned int reg)
 	case WM8903_DC_SERVO_READBACK_2:
 	case WM8903_DC_SERVO_READBACK_3:
 	case WM8903_DC_SERVO_READBACK_4:
-		return 1;
+		return true;
 
 	default:
-		return 0;
+		return false;
 	}
 }
 
Signature · 1 line
2.18.0