Message ID | 3d81e99b93dbe0d5b84083d3fdf6c86b44f210ef.1533418275.git.gustavo@embeddedor.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 064ee5a370150534e12e5bac4ff81f86528e27ca |
Headers | show |
Series | ASoC: codecs: use true and false for boolean values | expand |
On Sat, Aug 04, 2018 at 04:51:01PM -0500, Gustavo A. R. Silva wrote: > 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> > --- Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 411b9ee..457bc43 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -40,9 +40,9 @@ static bool wm8990_volatile_register(struct device *dev, unsigned int reg) { switch (reg) { case WM8990_RESET: - return 1; + return true; default: - return 0; + return false; } }
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/wm8990.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)