linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] ASoC: codecs: use true and false for boolean values
@ 2018-08-04 21:48 Gustavo A. R. Silva
  2018-08-04 21:49 ` [PATCH 01/12] ASoC: max9850: " Gustavo A. R. Silva
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:48 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: patches, Bard Liao, Oder Chiou, Brian Austin, Paul Handrigan,
	Support Opensource

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(-)

-- 
2.7.4


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

* [PATCH 01/12] ASoC: max9850: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-04 21:49 ` Gustavo A. R. Silva
  2018-08-04 21:49 ` [PATCH 02/12] ASoC: rt5631: " Gustavo A. R. Silva
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:49 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/max9850.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c
index 74d7f52..6e61345 100644
--- a/sound/soc/codecs/max9850.c
+++ b/sound/soc/codecs/max9850.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 02/12] ASoC: rt5631: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
  2018-08-04 21:49 ` [PATCH 01/12] ASoC: max9850: " Gustavo A. R. Silva
@ 2018-08-04 21:49 ` Gustavo A. R. Silva
  2018-08-04 21:50 ` [PATCH 03/12] ASoC: tda7419: " Gustavo A. R. Silva
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:49 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: Bard Liao, Oder Chiou

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/rt5631.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index e52e467..865f49a 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 03/12] ASoC: tda7419: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
  2018-08-04 21:49 ` [PATCH 01/12] ASoC: max9850: " Gustavo A. R. Silva
  2018-08-04 21:49 ` [PATCH 02/12] ASoC: rt5631: " Gustavo A. R. Silva
@ 2018-08-04 21:50 ` Gustavo A. R. Silva
  2018-08-04 21:51 ` [PATCH 04/12] ASoC: wm8990: " Gustavo A. R. Silva
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:50 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/tda7419.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tda7419.c b/sound/soc/codecs/tda7419.c
index 225c210..7f3b79c 100644
--- a/sound/soc/codecs/tda7419.c
+++ b/sound/soc/codecs/tda7419.c
@@ -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,
-- 
2.7.4


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

* [PATCH 04/12] ASoC: wm8990: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2018-08-04 21:50 ` [PATCH 03/12] ASoC: tda7419: " Gustavo A. R. Silva
@ 2018-08-04 21:51 ` Gustavo A. R. Silva
  2018-08-06  9:41   ` Charles Keepax
  2018-08-04 21:52 ` [PATCH 05/12] ASoC: cs4270: " Gustavo A. R. Silva
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:51 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: patches

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/wm8990.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 411b9ee..457bc43 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 05/12] ASoC: cs4270: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (3 preceding siblings ...)
  2018-08-04 21:51 ` [PATCH 04/12] ASoC: wm8990: " Gustavo A. R. Silva
@ 2018-08-04 21:52 ` Gustavo A. R. Silva
  2018-08-04 21:52 ` [PATCH 06/12] ASoC: wm8996: " Gustavo A. R. Silva
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:52 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: Brian Austin, Paul Handrigan

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/cs4270.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 2a7a416..3c266ee 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -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;
 }
-- 
2.7.4


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

* [PATCH 06/12] ASoC: wm8996: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (4 preceding siblings ...)
  2018-08-04 21:52 ` [PATCH 05/12] ASoC: cs4270: " Gustavo A. R. Silva
@ 2018-08-04 21:52 ` Gustavo A. R. Silva
  2018-08-06  9:41   ` Charles Keepax
  2018-08-04 21:53 ` [PATCH 07/12] ASoC: da7219: " Gustavo A. R. Silva
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:52 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: patches

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/wm8996.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 78a4082..91711f8 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 07/12] ASoC: da7219: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (5 preceding siblings ...)
  2018-08-04 21:52 ` [PATCH 06/12] ASoC: wm8996: " Gustavo A. R. Silva
@ 2018-08-04 21:53 ` Gustavo A. R. Silva
  2018-08-04 21:53 ` [PATCH 08/12] ASoC: twl6040: " Gustavo A. R. Silva
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:53 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: Support Opensource

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/da7219.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 980a6a8..c0144f2 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 08/12] ASoC: twl6040: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (6 preceding siblings ...)
  2018-08-04 21:53 ` [PATCH 07/12] ASoC: da7219: " Gustavo A. R. Silva
@ 2018-08-04 21:53 ` Gustavo A. R. Silva
  2018-08-04 21:54 ` [PATCH 09/12] ASoC: da7213: " Gustavo A. R. Silva
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:53 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/twl6040.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index bfd1abd..94675da 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 09/12] ASoC: da7213: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (7 preceding siblings ...)
  2018-08-04 21:53 ` [PATCH 08/12] ASoC: twl6040: " Gustavo A. R. Silva
@ 2018-08-04 21:54 ` Gustavo A. R. Silva
  2018-08-04 21:54 ` [PATCH 10/12] ASoC: wm5100-tables: " Gustavo A. R. Silva
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:54 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: Support Opensource

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/da7213.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 54cb5f2..92d006a 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 10/12] ASoC: wm5100-tables: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (8 preceding siblings ...)
  2018-08-04 21:54 ` [PATCH 09/12] ASoC: da7213: " Gustavo A. R. Silva
@ 2018-08-04 21:54 ` Gustavo A. R. Silva
  2018-08-06  9:42   ` Charles Keepax
  2018-08-04 21:55 ` [PATCH 11/12] ASoC: da9055: " Gustavo A. R. Silva
  2018-08-04 21:56 ` [PATCH 12/12] ASoC: wm8903: " Gustavo A. R. Silva
  11 siblings, 1 reply; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:54 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: patches

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.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.7.4


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

* [PATCH 11/12] ASoC: da9055: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (9 preceding siblings ...)
  2018-08-04 21:54 ` [PATCH 10/12] ASoC: wm5100-tables: " Gustavo A. R. Silva
@ 2018-08-04 21:55 ` Gustavo A. R. Silva
  2018-08-04 21:56 ` [PATCH 12/12] ASoC: wm8903: " Gustavo A. R. Silva
  11 siblings, 0 replies; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:55 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: Support Opensource

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/da9055.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index afdf90c..f6a7bf9 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* [PATCH 12/12] ASoC: wm8903: use true and false for boolean values
  2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
                   ` (10 preceding siblings ...)
  2018-08-04 21:55 ` [PATCH 11/12] ASoC: da9055: " Gustavo A. R. Silva
@ 2018-08-04 21:56 ` Gustavo A. R. Silva
  2018-08-06  9:42   ` Charles Keepax
  11 siblings, 1 reply; 17+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-04 21:56 UTC (permalink / raw)
  To: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Gustavo A. R. Silva, linux-kernel
  Cc: patches

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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 sound/soc/codecs/wm8903.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 7b8b6ef..6cb3c15 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -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;
 	}
 }
 
-- 
2.7.4


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

* Re: [PATCH 04/12] ASoC: wm8990: use true and false for boolean values
  2018-08-04 21:51 ` [PATCH 04/12] ASoC: wm8990: " Gustavo A. R. Silva
@ 2018-08-06  9:41   ` Charles Keepax
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Keepax @ 2018-08-06  9:41 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, linux-kernel, patches

On Sat, Aug 04, 2018 at 04:51:01PM -0500, Gustavo A. R. Silva wrote:
> 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.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

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

Thanks,
Charles

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

* Re: [PATCH 06/12] ASoC: wm8996: use true and false for boolean values
  2018-08-04 21:52 ` [PATCH 06/12] ASoC: wm8996: " Gustavo A. R. Silva
@ 2018-08-06  9:41   ` Charles Keepax
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Keepax @ 2018-08-06  9:41 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, linux-kernel, patches

On Sat, Aug 04, 2018 at 04:52:35PM -0500, Gustavo A. R. Silva wrote:
> 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.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

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

Thanks,
Charles

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

* Re: [PATCH 10/12] ASoC: wm5100-tables: use true and false for boolean values
  2018-08-04 21:54 ` [PATCH 10/12] ASoC: wm5100-tables: " Gustavo A. R. Silva
@ 2018-08-06  9:42   ` Charles Keepax
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Keepax @ 2018-08-06  9:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, linux-kernel, patches

On Sat, Aug 04, 2018 at 04:54:54PM -0500, Gustavo A. R. Silva wrote:
> 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.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

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

Thanks,
Charles

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

* Re: [PATCH 12/12] ASoC: wm8903: use true and false for boolean values
  2018-08-04 21:56 ` [PATCH 12/12] ASoC: wm8903: " Gustavo A. R. Silva
@ 2018-08-06  9:42   ` Charles Keepax
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Keepax @ 2018-08-06  9:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: alsa-devel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, linux-kernel, patches

On Sat, Aug 04, 2018 at 04:56:02PM -0500, Gustavo A. R. Silva wrote:
> 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.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

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

Thanks,
Charles

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

end of thread, other threads:[~2018-08-06  9:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04 21:48 [PATCH 00/12] ASoC: codecs: use true and false for boolean values Gustavo A. R. Silva
2018-08-04 21:49 ` [PATCH 01/12] ASoC: max9850: " Gustavo A. R. Silva
2018-08-04 21:49 ` [PATCH 02/12] ASoC: rt5631: " Gustavo A. R. Silva
2018-08-04 21:50 ` [PATCH 03/12] ASoC: tda7419: " Gustavo A. R. Silva
2018-08-04 21:51 ` [PATCH 04/12] ASoC: wm8990: " Gustavo A. R. Silva
2018-08-06  9:41   ` Charles Keepax
2018-08-04 21:52 ` [PATCH 05/12] ASoC: cs4270: " Gustavo A. R. Silva
2018-08-04 21:52 ` [PATCH 06/12] ASoC: wm8996: " Gustavo A. R. Silva
2018-08-06  9:41   ` Charles Keepax
2018-08-04 21:53 ` [PATCH 07/12] ASoC: da7219: " Gustavo A. R. Silva
2018-08-04 21:53 ` [PATCH 08/12] ASoC: twl6040: " Gustavo A. R. Silva
2018-08-04 21:54 ` [PATCH 09/12] ASoC: da7213: " Gustavo A. R. Silva
2018-08-04 21:54 ` [PATCH 10/12] ASoC: wm5100-tables: " Gustavo A. R. Silva
2018-08-06  9:42   ` Charles Keepax
2018-08-04 21:55 ` [PATCH 11/12] ASoC: da9055: " Gustavo A. R. Silva
2018-08-04 21:56 ` [PATCH 12/12] ASoC: wm8903: " Gustavo A. R. Silva
2018-08-06  9:42   ` Charles Keepax

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).