Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
5db35be9 ead03e72

+2 -2
+2 -2
include/linux/tty_buffer.h
··· 22 22 unsigned long data[]; 23 23 }; 24 24 25 - static inline u8 *char_buf_ptr(struct tty_buffer *b, int ofs) 25 + static inline u8 *char_buf_ptr(struct tty_buffer *b, unsigned int ofs) 26 26 { 27 27 return ((u8 *)b->data) + ofs; 28 28 } 29 29 30 - static inline u8 *flag_buf_ptr(struct tty_buffer *b, int ofs) 30 + static inline u8 *flag_buf_ptr(struct tty_buffer *b, unsigned int ofs) 31 31 { 32 32 return char_buf_ptr(b, ofs) + b->size; 33 33 }