Skip to contentSkip to conversation

n_tty: update comment for WAKEUP_CHARS define

PATCH In review Valentin Vidic 2 participants 3 messages Dec 29, 2018 – Jan 2, 2019 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 n_tty: update comment for WAKEUP_CHARS define

Give a better descriptions of what WAKEUP_CHARS represents.

---
 drivers/tty/n_tty.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/tty/n_tty.c +4 -2
index 3ad460219fd6..1dfbd45746da 100644
@@ -50,8 +50,10 @@
 #include <linux/ratelimit.h>
 #include <linux/vmalloc.h>
 
-
-/* number of characters left in xmit buffer before select has we have room */
+/*
+ * Until this number of characters is queued in the xmit buffer, select will
+ * return "we have room for writes".
+ */
 #define WAKEUP_CHARS 256
 
 /*
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Valentin Vidic

Give a better descriptions of what WAKEUP_CHARS represents.

I am not a native speaker, but this is much better than the current text.

BTW this text is copy&pasted from/to all the other WAKEUP_CHARS locations. Care to fix them all?

Quoted 12 lines
---
 drivers/tty/n_tty.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/tty/n_tty.c +0 -0
index 3ad460219fd6..1dfbd45746da 100644
@@ -50,8 +50,10 @@
 #include <linux/ratelimit.h>
 #include <linux/vmalloc.h>

drivers/tty/n_tty.c line 59

Quoted 10 lines
drivers/tty/n_tty.c +4 -2
 
-
-/* number of characters left in xmit buffer before select has we have room */
+/*
+ * Until this number of characters is queued in the xmit buffer, select will
+ * return "we have room for writes".
+ */
 #define WAKEUP_CHARS 256
 
 /*

thanks,

Signature · 2 lines
js
suse labs
#2 lore raw
Quoted 11 lines · Jiri Slaby
Quoted 3 lines · Valentin Vidic

Give a better descriptions of what WAKEUP_CHARS represents.

I am not a native speaker, but this is much better than the current text.

BTW this text is copy&pasted from/to all the other WAKEUP_CHARS locations. Care to fix them all?

Yes, I've seen other instances of WAKEUP_CHARS but they don't look like the same thing, for example:

rocket_int.h:/* number of characters left in xmit buffer before we ask for more */ rocket_int.h:#define WAKEUP_CHARS 256

rocket.c:       if (info->xmit_cnt < WAKEUP_CHARS) {
rocket.c:               tty_wakeup(tty);

Maybe the instance in n_tty.c could use a better name instead?

Signature · 1 line
Valentin