OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8e25a1
)
ASoC: soc-core: return true, false in snd_soc_volsw_is_stereo()
author
Jason Yan
<yanaijie@huawei.com>
Wed, 22 Apr 2020 07:18:05 +0000
(15:18 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 22 Apr 2020 12:15:56 +0000
(13:15 +0100)
Fix the following coccicheck warning:
include/sound/soc.h:1271:9-10: WARNING: return of 0/1 in function
'snd_soc_volsw_is_stereo' with return type bool
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link:
https://lore.kernel.org/r/20200422071805.48793-1-yanaijie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
patch
|
blob
|
history
diff --git
a/include/sound/soc.h
b/include/sound/soc.h
index
8f54226
..
7411546
100644
(file)
--- a/
include/sound/soc.h
+++ b/
include/sound/soc.h
@@
-1270,13
+1270,13
@@
static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
{
if (mc->reg == mc->rreg && mc->shift == mc->rshift)
- return
0
;
+ return
false
;
/*
* mc->reg == mc->rreg && mc->shift != mc->rshift, or
* mc->reg != mc->rreg means that the control is
* stereo (bits in one register or in two registers)
*/
- return
1
;
+ return
true
;
}
static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,