* [PATCH] ALSA: hda: Return true,false for return type bool
@ 2020-05-06 6:17 Jason Yan
2020-05-06 6:37 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Jason Yan @ 2020-05-06 6:17 UTC (permalink / raw)
To: perex, tiwai, alsa-devel, linux-kernel; +Cc: Jason Yan
Fix the following coccicheck warning:
include/sound/hdaudio.h:210:73-74: WARNING: return of 0/1 in function
'snd_hdac_is_in_pm' with return type bool
include/sound/hdaudio.h:211:76-77: WARNING: return of 0/1 in function
'snd_hdac_is_power_on' with return type bool
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
include/sound/hdaudio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index d365297b3698..10945963d727 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -207,8 +207,8 @@ static inline int snd_hdac_power_down_pm(struct hdac_device *codec) { return 0;
static inline int snd_hdac_keep_power_up(struct hdac_device *codec) { return 0; }
static inline void snd_hdac_enter_pm(struct hdac_device *codec) {}
static inline void snd_hdac_leave_pm(struct hdac_device *codec) {}
-static inline bool snd_hdac_is_in_pm(struct hdac_device *codec) { return 0; }
-static inline bool snd_hdac_is_power_on(struct hdac_device *codec) { return 1; }
+static inline bool snd_hdac_is_in_pm(struct hdac_device *codec) { return false; }
+static inline bool snd_hdac_is_power_on(struct hdac_device *codec) { return true; }
#endif
/*
--
2.21.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda: Return true,false for return type bool
2020-05-06 6:17 [PATCH] ALSA: hda: Return true,false for return type bool Jason Yan
@ 2020-05-06 6:37 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-06 6:37 UTC (permalink / raw)
To: Jason Yan; +Cc: perex, tiwai, alsa-devel, linux-kernel
On Wed, 06 May 2020 08:17:16 +0200,
Jason Yan wrote:
>
> Fix the following coccicheck warning:
>
> include/sound/hdaudio.h:210:73-74: WARNING: return of 0/1 in function
> 'snd_hdac_is_in_pm' with return type bool
> include/sound/hdaudio.h:211:76-77: WARNING: return of 0/1 in function
> 'snd_hdac_is_power_on' with return type bool
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda: Return true,false for return type bool
@ 2020-05-06 6:37 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-06 6:37 UTC (permalink / raw)
To: Jason Yan; +Cc: linux-kernel, alsa-devel, tiwai
On Wed, 06 May 2020 08:17:16 +0200,
Jason Yan wrote:
>
> Fix the following coccicheck warning:
>
> include/sound/hdaudio.h:210:73-74: WARNING: return of 0/1 in function
> 'snd_hdac_is_in_pm' with return type bool
> include/sound/hdaudio.h:211:76-77: WARNING: return of 0/1 in function
> 'snd_hdac_is_power_on' with return type bool
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-06 6:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 6:17 [PATCH] ALSA: hda: Return true,false for return type bool Jason Yan
2020-05-06 6:37 ` Takashi Iwai
2020-05-06 6:37 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.