mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Li <yang.lee@linux.alibaba.com>
To: lgirdwood@gmail.com
Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning
Date: Wed, 16 Jun 2021 10:45:35 +0800	[thread overview]
Message-ID: <1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com> (raw)

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


             reply	other threads:[~2021-06-16  2:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  2:45 Yang Li [this message]
2021-06-16 16:41 ` 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=1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com \
    --to=yang.lee@linux.alibaba.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®