linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: bcm2835-audi: Removed return statement from void functions
@ 2017-02-23 13:00 Abhijit Naik
  2017-02-23 13:01 ` [PATCH 2/2] staging: bcm2835-audio: Removed braces of single statement blocks Abhijit Naik
  0 siblings, 1 reply; 2+ messages in thread
From: Abhijit Naik @ 2017-02-23 13:00 UTC (permalink / raw)
  To: gregkh
  Cc: rjui, bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	Abhijit Naik

bcm2835-vchiq.c:
fixing WARNING: void function return statements are not generally useful

Signed-off-by: Abhijit Naik <abhijitnaik27@gmail.com>
---
 drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
index fa23a13f8d95..1a6b4382c15b 100644
--- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
@@ -204,7 +204,6 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
 static void my_workqueue_init(struct bcm2835_alsa_stream *alsa_stream)
 {
 	alsa_stream->my_wq = alloc_workqueue("my_queue", WQ_HIGHPRI, 1);
-	return;
 }
 
 static void my_workqueue_quit(struct bcm2835_alsa_stream *alsa_stream)
@@ -214,7 +213,6 @@ static void my_workqueue_quit(struct bcm2835_alsa_stream *alsa_stream)
 		destroy_workqueue(alsa_stream->my_wq);
 		alsa_stream->my_wq = NULL;
 	}
-	return;
 }
 
 static void audio_vchi_callback(void *param,
@@ -887,7 +885,6 @@ void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream)
 {
 	LOG_DBG(" .. IN\n");
 	LOG_DBG(" .. OUT\n");
-	return;
 }
 
 /**
-- 
2.11.0

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

* [PATCH 2/2] staging: bcm2835-audio: Removed braces of single statement blocks
  2017-02-23 13:00 [PATCH 1/2] staging: bcm2835-audi: Removed return statement from void functions Abhijit Naik
@ 2017-02-23 13:01 ` Abhijit Naik
  0 siblings, 0 replies; 2+ messages in thread
From: Abhijit Naik @ 2017-02-23 13:01 UTC (permalink / raw)
  To: gregkh
  Cc: rjui, bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	Abhijit Naik

bcm2835-vchiq.c:
fixing WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Abhijit Naik <abhijitnaik27@gmail.com>
---
 drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
index 1a6b4382c15b..df1f3dd9e226 100644
--- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
@@ -227,9 +227,9 @@ static void audio_vchi_callback(void *param,
 	LOG_DBG(" .. IN instance=%p, handle=%p, alsa=%p, reason=%d, handle=%p\n",
 		instance, instance ? instance->vchi_handle[0] : NULL, instance ? instance->alsa_stream : NULL, reason, msg_handle);
 
-	if (reason != VCHI_CALLBACK_MSG_AVAILABLE) {
+	if (reason != VCHI_CALLBACK_MSG_AVAILABLE)
 		return;
-	}
+
 	if (!instance) {
 		LOG_ERR(" .. instance is null\n");
 		BUG();
@@ -818,9 +818,10 @@ static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream,
 	}
 	vchi_service_use(instance->vchi_handle[0]);
 
-	if (instance->peer_version == 0 && vchi_get_peer_version(instance->vchi_handle[0], &instance->peer_version) == 0) {
+	if (instance->peer_version == 0 &&
+			vchi_get_peer_version(instance->vchi_handle[0], &instance->peer_version) == 0)
 		LOG_DBG("%s: client version %d connected\n", __func__, instance->peer_version);
-	}
+
 	m.type = VC_AUDIO_MSG_TYPE_WRITE;
 	m.u.write.count = count;
 	// old version uses bulk, new version uses control
-- 
2.11.0

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

end of thread, other threads:[~2017-02-23 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 13:00 [PATCH 1/2] staging: bcm2835-audi: Removed return statement from void functions Abhijit Naik
2017-02-23 13:01 ` [PATCH 2/2] staging: bcm2835-audio: Removed braces of single statement blocks Abhijit Naik

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