From: Yaowei Bai <bywxiaobai@163.com>
To: perex@perex.cz, tiwai@suse.com, johannes@sipsolutions.net,
k.kozlowski@samsung.com, elfring@users.sourceforge.net,
fabf@skynet.be, lars@metafoo.de
Cc: linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/4] sound/core/seq: make prioq_match return bool
Date: Wed, 23 Sep 2015 21:58:31 +0800 [thread overview]
Message-ID: <1443016711-5297-4-git-send-email-bywxiaobai@163.com> (raw)
In-Reply-To: <1443016711-5297-1-git-send-email-bywxiaobai@163.com>
This patch makes prioq_match return bool due to this particular
function only using either one or zero as its return value.
No functional change.
Change from v1:
fix indentation to line up properly (Johannes Berg)
Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
sound/core/seq/seq_prioq.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index bc1c848..95d0e2c 100644
--- a/sound/core/seq/seq_prioq.c
+++ b/sound/core/seq/seq_prioq.c
@@ -264,26 +264,26 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
}
-static inline int prioq_match(struct snd_seq_event_cell *cell,
- int client, int timestamp)
+static inline bool prioq_match(struct snd_seq_event_cell *cell,
+ int client, int timestamp)
{
if (cell->event.source.client == client ||
cell->event.dest.client == client)
- return 1;
+ return true;
if (!timestamp)
- return 0;
+ return false;
switch (cell->event.flags & SNDRV_SEQ_TIME_STAMP_MASK) {
case SNDRV_SEQ_TIME_STAMP_TICK:
if (cell->event.time.tick)
- return 1;
+ return true;
break;
case SNDRV_SEQ_TIME_STAMP_REAL:
if (cell->event.time.time.tv_sec ||
cell->event.time.time.tv_nsec)
- return 1;
+ return true;
break;
}
- return 0;
+ return false;
}
/* remove cells for left client */
--
1.9.1
prev parent reply other threads:[~2015-09-23 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 13:58 [PATCH RESEND 1/4] sound/onyx: remove redundant case entry Yaowei Bai
2015-09-23 13:58 ` [PATCH RESEND 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai
2015-09-23 13:58 ` [PATCH RESEND 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly Yaowei Bai
2015-09-23 13:58 ` Yaowei Bai [this message]
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=1443016711-5297-4-git-send-email-bywxiaobai@163.com \
--to=bywxiaobai@163.com \
--cc=alsa-devel@alsa-project.org \
--cc=elfring@users.sourceforge.net \
--cc=fabf@skynet.be \
--cc=johannes@sipsolutions.net \
--cc=k.kozlowski@samsung.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).