linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] sound/onyx: remove redundant case entry
@ 2015-09-21 13:57 Yaowei Bai
  2015-09-21 13:57 ` [PATCH 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Yaowei Bai @ 2015-09-21 13:57 UTC (permalink / raw)
  To: perex, tiwai, johannes, k.kozlowski, elfring, fabf, lars
  Cc: linuxppc-dev, alsa-devel, linux-kernel

Case ti->tag == 0 can be included in the last return,
remove it.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 sound/aoa/codecs/onyx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index a04edff..a407e1f 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -683,7 +683,6 @@ static int onyx_usable(struct codec_info_item *cii,
 	mutex_unlock(&onyx->mutex);
 
 	switch (ti->tag) {
-	case 0: return 1;
 	case 1:	return analog_enabled;
 	case 2: return spdif_enabled;
 	}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] sound/i2sbus/core: make format more appropriate
  2015-09-21 13:57 [PATCH 1/4] sound/onyx: remove redundant case entry Yaowei Bai
@ 2015-09-21 13:57 ` Yaowei Bai
  2015-09-21 13:57 ` [PATCH 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly Yaowei Bai
  2015-09-21 13:57 ` [PATCH 4/4] sound/core/seq: make prioq_match return bool Yaowei Bai
  2 siblings, 0 replies; 8+ messages in thread
From: Yaowei Bai @ 2015-09-21 13:57 UTC (permalink / raw)
  To: perex, tiwai, johannes, k.kozlowski, elfring, fabf, lars
  Cc: linuxppc-dev, alsa-devel, linux-kernel

Make 'return' stay in a singe line.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 sound/aoa/soundbus/i2sbus/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 1cbf210..6f216c0 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -62,7 +62,8 @@ static int alloc_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev,
 static void free_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev,
 				       struct dbdma_command_mem *r)
 {
-	if (!r->space) return;
+	if (!r->space)
+		return;
 
 	dma_free_coherent(&macio_get_pci_dev(i2sdev->macio)->dev,
 			    r->size, r->space, r->bus_addr);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly
  2015-09-21 13:57 [PATCH 1/4] sound/onyx: remove redundant case entry Yaowei Bai
  2015-09-21 13:57 ` [PATCH 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai
@ 2015-09-21 13:57 ` Yaowei Bai
  2015-09-21 13:57 ` [PATCH 4/4] sound/core/seq: make prioq_match return bool Yaowei Bai
  2 siblings, 0 replies; 8+ messages in thread
From: Yaowei Bai @ 2015-09-21 13:57 UTC (permalink / raw)
  To: perex, tiwai, johannes, k.kozlowski, elfring, fabf, lars
  Cc: linuxppc-dev, alsa-devel, linux-kernel

Catching the return value of soundbus_register_driver in
aoa_fabric_layout_init is not necessary, let's return it
directly.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 sound/aoa/fabrics/layout.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
index 8f71f7e..b6ba091 100644
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -1161,12 +1161,7 @@ static struct soundbus_driver aoa_soundbus_driver = {
 
 static int __init aoa_fabric_layout_init(void)
 {
-	int err;
-
-	err = soundbus_register_driver(&aoa_soundbus_driver);
-	if (err)
-		return err;
-	return 0;
+	return soundbus_register_driver(&aoa_soundbus_driver);
 }
 
 static void __exit aoa_fabric_layout_exit(void)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] sound/core/seq: make prioq_match return bool
  2015-09-21 13:57 [PATCH 1/4] sound/onyx: remove redundant case entry Yaowei Bai
  2015-09-21 13:57 ` [PATCH 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai
  2015-09-21 13:57 ` [PATCH 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly Yaowei Bai
@ 2015-09-21 13:57 ` Yaowei Bai
  2015-09-21 14:11   ` Johannes Berg
  2 siblings, 1 reply; 8+ messages in thread
From: Yaowei Bai @ 2015-09-21 13:57 UTC (permalink / raw)
  To: perex, tiwai, johannes, k.kozlowski, elfring, fabf, lars
  Cc: linuxppc-dev, alsa-devel, linux-kernel

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.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 sound/core/seq/seq_prioq.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index bc1c848..aebae09 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,
+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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool
  2015-09-21 13:57 ` [PATCH 4/4] sound/core/seq: make prioq_match return bool Yaowei Bai
@ 2015-09-21 14:11   ` Johannes Berg
  2015-09-22 13:22     ` Yaowei Bai
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2015-09-21 14:11 UTC (permalink / raw)
  To: Yaowei Bai, perex, tiwai, k.kozlowski, elfring, fabf, lars
  Cc: linuxppc-dev, alsa-devel, linux-kernel


> -static inline int prioq_match(struct snd_seq_event_cell *cell,
> +static inline bool prioq_match(struct snd_seq_event_cell *cell,
>  			      int client, int timestamp)

I think you should fix up the indentation now.

johannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool
  2015-09-21 14:11   ` Johannes Berg
@ 2015-09-22 13:22     ` Yaowei Bai
  2015-09-22 13:28       ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Yaowei Bai @ 2015-09-22 13:22 UTC (permalink / raw)
  To: Johannes Berg
  Cc: perex, tiwai, k.kozlowski, elfring, fabf, lars, linuxppc-dev,
	alsa-devel, linux-kernel

On Mon, Sep 21, 2015 at 04:11:00PM +0200, Johannes Berg wrote:
> 
> > -static inline int prioq_match(struct snd_seq_event_cell *cell,
> > +static inline bool prioq_match(struct snd_seq_event_cell *cell,
> >  			      int client, int timestamp)
> 
> I think you should fix up the indentation now.

Sorry, I'm quite a new guy to linux kernel. I think you mean this patch
is not appropriate, right?

> 
> johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool
  2015-09-22 13:22     ` Yaowei Bai
@ 2015-09-22 13:28       ` Johannes Berg
  2015-09-23 13:29         ` Yaowei Bai
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2015-09-22 13:28 UTC (permalink / raw)
  To: Yaowei Bai
  Cc: perex, tiwai, k.kozlowski, elfring, fabf, lars, linuxppc-dev,
	alsa-devel, linux-kernel

On Tue, 2015-09-22 at 21:22 +0800, Yaowei Bai wrote:
> On Mon, Sep 21, 2015 at 04:11:00PM +0200, Johannes Berg wrote:
> > 
> > > -static inline int prioq_match(struct snd_seq_event_cell *cell,
> > > +static inline bool prioq_match(struct snd_seq_event_cell *cell,
> > >  			      int client, int timestamp)
> > 
> > I think you should fix up the indentation now.
> 
> Sorry, I'm quite a new guy to linux kernel. I think you mean this 
> patch is not appropriate, right?
> 

No, the change itself is fine, but you should fix the indentation there
so it lines up properly after your change.

johannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool
  2015-09-22 13:28       ` Johannes Berg
@ 2015-09-23 13:29         ` Yaowei Bai
  0 siblings, 0 replies; 8+ messages in thread
From: Yaowei Bai @ 2015-09-23 13:29 UTC (permalink / raw)
  To: Johannes Berg
  Cc: perex, tiwai, k.kozlowski, elfring, fabf, lars, linuxppc-dev,
	alsa-devel, linux-kernel

On Tue, Sep 22, 2015 at 03:28:12PM +0200, Johannes Berg wrote:
> On Tue, 2015-09-22 at 21:22 +0800, Yaowei Bai wrote:
> > On Mon, Sep 21, 2015 at 04:11:00PM +0200, Johannes Berg wrote:
> > > 
> > > > -static inline int prioq_match(struct snd_seq_event_cell *cell,
> > > > +static inline bool prioq_match(struct snd_seq_event_cell *cell,
> > > >  			      int client, int timestamp)
> > > 
> > > I think you should fix up the indentation now.
> > 
> > Sorry, I'm quite a new guy to linux kernel. I think you mean this 
> > patch is not appropriate, right?
> > 
> 
> No, the change itself is fine, but you should fix the indentation there
> so it lines up properly after your change.

OK, will send it ASAP. Thanks.

> 
> johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-23 13:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 13:57 [PATCH 1/4] sound/onyx: remove redundant case entry Yaowei Bai
2015-09-21 13:57 ` [PATCH 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai
2015-09-21 13:57 ` [PATCH 3/4] sound/fabrics/layout: make aoa_fabric_layout_init return directly Yaowei Bai
2015-09-21 13:57 ` [PATCH 4/4] sound/core/seq: make prioq_match return bool Yaowei Bai
2015-09-21 14:11   ` Johannes Berg
2015-09-22 13:22     ` Yaowei Bai
2015-09-22 13:28       ` Johannes Berg
2015-09-23 13:29         ` Yaowei Bai

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).