[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Wed, 16 Jun 2021 10:45:35 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: lgirdwood@...il.com
Cc: broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
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@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.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
Powered by blists - more mailing lists