diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-10 11:14:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 21:12:45 +0200 |
commit | 5db35be97cca6dd250df5c8144fcf7429ceb7f12 (patch) | |
tree | 813a90c037101a02ffa3a521b36dd60a3712fa19 /include/linux/tty_buffer.h | |
parent | ead03e721f410d83825835b5abd8e84fcb4305fa (diff) |
tty: make char_buf_ptr()/flag_buf_ptr()'s offset unsigned
The offset is meant from the beginning of data, so unsigned. Make it as
such for clarity. All struct tty_buffer's members should be unsigned
too -- see the next patch.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-20-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_buffer.h')
-rw-r--r-- | include/linux/tty_buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h index b11cc8c749d2..391a875be20c 100644 --- a/include/linux/tty_buffer.h +++ b/include/linux/tty_buffer.h @@ -22,12 +22,12 @@ struct tty_buffer { unsigned long data[]; }; -static inline u8 *char_buf_ptr(struct tty_buffer *b, int ofs) +static inline u8 *char_buf_ptr(struct tty_buffer *b, unsigned int ofs) { return ((u8 *)b->data) + ofs; } -static inline u8 *flag_buf_ptr(struct tty_buffer *b, int ofs) +static inline u8 *flag_buf_ptr(struct tty_buffer *b, unsigned int ofs) { return char_buf_ptr(b, ofs) + b->size; } |