Thread (27 messages) 27 messages, 5 authors, 2017-03-23

Re: [PATCHv2 05/11] serdev: add serdev_device_wait_until_sent

From: Pavel Machek <hidden>
Date: 2017-03-22 09:48:28
Also in: linux-bluetooth, linux-serial, lkml

Hi!
quoted hunk ↗ jump to hunk
@@ -47,10 +48,13 @@ static void ttyport_write_wakeup(struct tty_port *port)
 	struct serport *serport = serdev_controller_get_drvdata(ctrl);
 
 	if (!test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags))
-		return;
+		goto out;
 
 	if (test_bit(SERPORT_ACTIVE, &serport->flags))
 		serdev_controller_write_wakeup(ctrl);
+
+out:
I'd do "if (test_and_clear_bit() && test_bit()) serdev_()"
here. Otherwise it looks fine.

Acked-by: Pavel Machek <redacted>

									Pavel
									
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help