Re: [PATCH 16/36] tty: use u8 for chars

From
Jiri Slaby <jirislaby@kernel.org>
Date
2023-08-14 06:36:11
Also in
lkml
Reply to
Ilpo Järvinen, 2023-08-11
On 11. 08. 23, 12:28, Ilpo Järvinen wrote:
On Thu, 10 Aug 2023, Jiri Slaby (SUSE) wrote:
quoted
This makes all those 'unsigned char's an explicit 'u8'. This is part of
the continuing unification of chars and flags to be consistent u8.

This approaches tty_port_default_receive_buf(). Flags to be next.
...>> diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h
quoted
index 6ceb2789e6c8..6f2966b15093 100644
--- a/include/linux/tty_buffer.h
+++ b/include/linux/tty_buffer.h
@@ -22,9 +22,9 @@ struct tty_buffer {
  	unsigned long data[];
  };
  
-static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs)
+static inline u8 *char_buf_ptr(struct tty_buffer *b, int ofs)
  {
-	return ((unsigned char *)b->data) + ofs;
+	return ((u8 *)b->data) + ofs;
  }
Any particular reason why b->data is left unsigned long?
Nope :):
https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?h=devel&id=57c9d0cbe1ad69957a2092b66dc31dc1da4d1d4b

I am dumb not mentioning it in 00/36, see my e-mail there.

thanks,
-- 
js
suse labs
Thread (68 messages) 68 messages, 11 authors, last reply 2023-08-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help