All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-kernel@vger.kernel.org
Cc: patches@opensource.cirrus.com
Subject: [PATCH 06/12] ASoC: wm8996: use true and false for boolean values
Date: Sat, 4 Aug 2018 16:52:35 -0500	[thread overview]
Message-ID: <d6c8a37703ecad97a48f5ba080ceec38697d100e.1533418275.git.gustavo@embeddedor.com> (raw)
In-Reply-To: <cover.1533418275.git.gustavo@embeddedor.com>

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


  parent reply	other threads:[~2018-08-04 21:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-06 11:43   ` Applied "ASoC: max9850: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:49 ` [PATCH 02/12] ASoC: rt5631: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:43   ` Applied "ASoC: rt5631: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:50 ` [PATCH 03/12] ASoC: tda7419: use true and false for boolean values 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-06  9:41     ` Charles Keepax
2018-08-06 11:42   ` Applied "ASoC: wm8990: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:52 ` [PATCH 05/12] ASoC: cs4270: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:42   ` Applied "ASoC: cs4270: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:52 ` Gustavo A. R. Silva [this message]
2018-08-06  9:41   ` [PATCH 06/12] ASoC: wm8996: use true and false for boolean values Charles Keepax
2018-08-06  9:41     ` Charles Keepax
2018-08-06 11:42   ` Applied "ASoC: wm8996: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:53 ` [PATCH 07/12] ASoC: da7219: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:41   ` Applied "ASoC: da7219: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:53 ` [PATCH 08/12] ASoC: twl6040: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:41   ` Applied "ASoC: twl6040: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:54 ` [PATCH 09/12] ASoC: da7213: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:41   ` Applied "ASoC: da7213: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:54 ` [PATCH 10/12] ASoC: wm5100-tables: use true and false for boolean values Gustavo A. R. Silva
2018-08-06  9:42   ` Charles Keepax
2018-08-06  9:42     ` Charles Keepax
2018-08-04 21:55 ` [PATCH 11/12] ASoC: da9055: " Gustavo A. R. Silva
2018-08-06 11:40   ` Applied "ASoC: da9055: use true and false for boolean values" to the asoc tree Mark Brown
2018-08-04 21:56 ` [PATCH 12/12] ASoC: wm8903: use true and false for boolean values Gustavo A. R. Silva
2018-08-06  9:42   ` Charles Keepax
2018-08-06  9:42     ` Charles Keepax
2018-08-06 11:40   ` Applied "ASoC: wm8903: use true and false for boolean values" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6c8a37703ecad97a48f5ba080ceec38697d100e.1533418275.git.gustavo@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.