From: Yang Li Date: Wed, 16 Jun 2021 02:45:35 +0000 (+0800) Subject: ASoC: codecs: wcd938x: fix boolreturn.cocci warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=83bd5c53ebf6f2f7b8b0b7db4c038ad7a5a5448a;p=linux.git ASoC: 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 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index a8ebfaf077cdf..cb22fdf812f43 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -1186,7 +1186,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;