diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2023-10-17 21:40:46 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2023-10-17 21:40:46 +0200 |
| commit | a940daa52167e9db8ecce82213813b735a9d9f23 (patch) | |
| tree | d5346c51351ccd1da7532cbec3127e6b73ec59c9 /include/linux/tty_buffer.h | |
| parent | 32e4fa37fa667fdf53499b9de92737dc75199d8e (diff) | |
| parent | 58720809f52779dc0f08e53e54b014209d13eebb (diff) | |
Merge branch 'linus' into smp/core
Pull in upstream to get the fixes so depending changes can be applied.
Diffstat (limited to 'include/linux/tty_buffer.h')
| -rw-r--r-- | include/linux/tty_buffer.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h index 6ceb2789e6c8..31125e3be3c5 100644 --- a/include/linux/tty_buffer.h +++ b/include/linux/tty_buffer.h @@ -12,24 +12,24 @@ struct tty_buffer { struct tty_buffer *next; struct llist_node free; }; - int used; - int size; - int commit; - int lookahead; /* Lazy update on recv, can become less than "read" */ - int read; + unsigned int used; + unsigned int size; + unsigned int commit; + unsigned int lookahead; /* Lazy update on recv, can become less than "read" */ + unsigned int read; bool flags; /* Data points here */ - unsigned long data[]; + u8 data[] __aligned(sizeof(unsigned long)); }; -static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) +static inline u8 *char_buf_ptr(struct tty_buffer *b, unsigned int ofs) { - return ((unsigned char *)b->data) + ofs; + return b->data + ofs; } -static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs) +static inline u8 *flag_buf_ptr(struct tty_buffer *b, unsigned int ofs) { - return (char *)char_buf_ptr(b, ofs) + b->size; + return char_buf_ptr(b, ofs) + b->size; } struct tty_bufhead { |
