All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
@ 2021-06-16  2:45 ` Yang Li
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Li @ 2021-06-16  2:45 UTC (permalink / raw)
  To: lgirdwood; +Cc: broonie, perex, tiwai, alsa-devel, linux-kernel, Yang Li

Return statements in functions returning bool should use true/false
instead of 1/0.

Fix the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
function 'wcd938x_volatile_register' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 sound/soc/codecs/wcd938x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 2cf6145..cfe00536 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1187,7 +1187,7 @@ static bool wcd938x_writeable_register(struct device *dev, unsigned int reg)
 static bool wcd938x_volatile_register(struct device *dev, unsigned int reg)
 {
 	if (reg <= WCD938X_BASE_ADDRESS)
-		return 0;
+		return false;
 
 	if (reg == WCD938X_DIGITAL_SWR_TX_CLK_RATE)
 		return true;
-- 
1.8.3.1


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

* [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
@ 2021-06-16  2:45 ` Yang Li
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Li @ 2021-06-16  2:45 UTC (permalink / raw)
  To: lgirdwood; +Cc: alsa-devel, linux-kernel, tiwai, broonie, Yang Li

Return statements in functions returning bool should use true/false
instead of 1/0.

Fix the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
function 'wcd938x_volatile_register' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 sound/soc/codecs/wcd938x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 2cf6145..cfe00536 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1187,7 +1187,7 @@ static bool wcd938x_writeable_register(struct device *dev, unsigned int reg)
 static bool wcd938x_volatile_register(struct device *dev, unsigned int reg)
 {
 	if (reg <= WCD938X_BASE_ADDRESS)
-		return 0;
+		return false;
 
 	if (reg == WCD938X_DIGITAL_SWR_TX_CLK_RATE)
 		return true;
-- 
1.8.3.1


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

* Re: [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
  2021-06-16  2:45 ` Yang Li
@ 2021-06-16 16:41   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-06-16 16:41 UTC (permalink / raw)
  To: lgirdwood, Yang Li; +Cc: Mark Brown, linux-kernel, perex, alsa-devel, tiwai

On Wed, 16 Jun 2021 10:45:35 +0800, Yang Li wrote:
> Return statements in functions returning bool should use true/false
> instead of 1/0.
> 
> Fix the following coccicheck warning:
> ./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
> function 'wcd938x_volatile_register' with return type bool.

Applied to

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

Thanks!

[1/1] SoC: codecs: wcd938x: fix boolreturn.cocci warning
      commit: 83bd5c53ebf6f2f7b8b0b7db4c038ad7a5a5448a

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

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

* Re: [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
@ 2021-06-16 16:41   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-06-16 16:41 UTC (permalink / raw)
  To: lgirdwood, Yang Li; +Cc: alsa-devel, Mark Brown, tiwai, linux-kernel

On Wed, 16 Jun 2021 10:45:35 +0800, Yang Li wrote:
> Return statements in functions returning bool should use true/false
> instead of 1/0.
> 
> Fix the following coccicheck warning:
> ./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
> function 'wcd938x_volatile_register' with return type bool.

Applied to

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

Thanks!

[1/1] SoC: codecs: wcd938x: fix boolreturn.cocci warning
      commit: 83bd5c53ebf6f2f7b8b0b7db4c038ad7a5a5448a

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

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

end of thread, other threads:[~2021-06-16 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  2:45 [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning Yang Li
2021-06-16  2:45 ` Yang Li
2021-06-16 16:41 ` Mark Brown
2021-06-16 16:41   ` Mark Brown

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.