kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: android: Cleanup style issues
@ 2014-07-12 19:55 Peter Senna Tschudin
  2014-07-12 20:23 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Senna Tschudin @ 2014-07-12 19:55 UTC (permalink / raw)
  To: gregkh, swetland, daniel, maarten.lankhorst, john.stultz,
	sumit.semwal, peter.senna, devel, linux-kernel, kernel-janitors

This patch fixes the following checkpatch warnings:
 - Remove else after return
 - Add space after declaration

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
 drivers/staging/android/sync_debug.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index a9f7fd5..257fc91 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -74,10 +74,11 @@ static const char *sync_status_str(int status)
 {
 	if (status = 0)
 		return "signaled";
-	else if (status > 0)
+
+	if (status > 0)
 		return "active";
-	else
-		return "error";
+
+	return "error";
 }
 
 static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)
@@ -95,12 +96,14 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)
 
 	if (status <= 0) {
 		struct timeval tv = ktime_to_timeval(pt->base.timestamp);
+
 		seq_printf(s, "@%ld.%06ld", tv.tv_sec, tv.tv_usec);
 	}
 
 	if (parent->ops->timeline_value_str &&
 	    parent->ops->pt_value_str) {
 		char value[64];
+
 		parent->ops->pt_value_str(pt, value, sizeof(value));
 		seq_printf(s, ": %s", value);
 		if (fence) {
@@ -122,6 +125,7 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
 
 	if (obj->ops->timeline_value_str) {
 		char value[64];
+
 		obj->ops->timeline_value_str(obj, value, sizeof(value));
 		seq_printf(s, ": %s", value);
 	}
@@ -234,6 +238,7 @@ void sync_dump(void)
 	for (i = 0; i < s.count; i += DUMP_CHUNK) {
 		if ((s.count - i) > DUMP_CHUNK) {
 			char c = s.buf[i + DUMP_CHUNK];
+
 			s.buf[i + DUMP_CHUNK] = 0;
 			pr_cont("%s", s.buf + i);
 			s.buf[i + DUMP_CHUNK] = c;
-- 
1.9.3


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

* Re: [PATCH] staging: android: Cleanup style issues
  2014-07-12 19:55 [PATCH] staging: android: Cleanup style issues Peter Senna Tschudin
@ 2014-07-12 20:23 ` Greg KH
  2014-07-12 20:24   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-07-12 20:23 UTC (permalink / raw)
  To: Peter Senna Tschudin
  Cc: swetland, daniel, maarten.lankhorst, john.stultz, sumit.semwal,
	devel, linux-kernel, kernel-janitors

On Sat, Jul 12, 2014 at 09:55:56PM +0200, Peter Senna Tschudin wrote:
> This patch fixes the following checkpatch warnings:
>  - Remove else after return
>  - Add space after declaration
> 
> Tested by compilation only.
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
> ---
>  drivers/staging/android/sync_debug.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

This file is no longer in my kernel tree, what tree did you make it
against?

Please create staging patches against the staging-next branch of the
staging.git tree on git.kernel.org so that I can apply them.

thanks,

greg k-h

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

* Re: [PATCH] staging: android: Cleanup style issues
  2014-07-12 20:23 ` Greg KH
@ 2014-07-12 20:24   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2014-07-12 20:24 UTC (permalink / raw)
  To: Peter Senna Tschudin
  Cc: swetland, daniel, maarten.lankhorst, john.stultz, sumit.semwal,
	devel, linux-kernel, kernel-janitors

On Sat, Jul 12, 2014 at 01:23:10PM -0700, Greg KH wrote:
> On Sat, Jul 12, 2014 at 09:55:56PM +0200, Peter Senna Tschudin wrote:
> > This patch fixes the following checkpatch warnings:
> >  - Remove else after return
> >  - Add space after declaration
> > 
> > Tested by compilation only.
> > 
> > Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
> > ---
> >  drivers/staging/android/sync_debug.c | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> This file is no longer in my kernel tree, what tree did you make it
> against?
> 
> Please create staging patches against the staging-next branch of the
> staging.git tree on git.kernel.org so that I can apply them.

Ah, nevermind, things moved around here, I figured this out, sorry for
the noise...

greg k-h

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

end of thread, other threads:[~2014-07-12 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-12 19:55 [PATCH] staging: android: Cleanup style issues Peter Senna Tschudin
2014-07-12 20:23 ` Greg KH
2014-07-12 20:24   ` Greg KH

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