mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: host: ehci-sched: silence checkpatch warning
@ 2015-12-12  1:50 Geyslan G. Bem
  2015-12-12  2:02 ` Geyslan G. Bem
  2015-12-12 16:19 ` Alan Stern
  0 siblings, 2 replies; 4+ messages in thread
From: Geyslan G. Bem @ 2015-12-12  1:50 UTC (permalink / raw)
  Cc: Geyslan G. Bem, joe, peter.senna, Alan Stern, Greg Kroah-Hartman,
	linux-usb, linux-kernel

This patch moves comment into the else branch avoiding the following
misleading warning.

"braces {} are not necessary for single statement blocks"

Caught by checkpatch.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Suggested-by: Joe Perches <joe@perches.com>
---
 drivers/usb/host/ehci-sched.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index f6e828a..b2af0b3 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1560,13 +1560,10 @@ iso_stream_schedule(
 					(stream->ps.bw_period - 1);
 			stream->ps.phase_uf = start & 7;
 			reserve_release_iso_bandwidth(ehci, stream, 1);
-		}
-
-		/* New stream is already scheduled; use the upcoming slot */
-		else {
+		} else {
+			/* New stream is already scheduled; use the upcoming slot */
 			start = (stream->ps.phase << 3) + stream->ps.phase_uf;
 		}
-
 		stream->next_uframe = start;
 		new_stream = true;
 	}
-- 
2.6.3


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

end of thread, other threads:[~2015-12-12 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-12  1:50 [PATCH] usb: host: ehci-sched: silence checkpatch warning Geyslan G. Bem
2015-12-12  2:02 ` Geyslan G. Bem
2015-12-12 16:19 ` Alan Stern
2015-12-12 16:39   ` Geyslan G. Bem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®