Skip to contentSkip to conversation

speed_t usage?

DISCUSSION Andy Shevchenko 2 participants 3 messages Mar 13, 2024 – Apr 9, 2024 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hi!

Recently while doing some serial driver cleanup I realised that TTY uses speed_t type for baud rates. What is the appropriate use of it? Either it is going to be killed (replaced with POD), or should / may we spread it over tty/serial and further?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#1 lore raw
Quoted 6 lines · Andy Shevchenko

Hi!

Recently while doing some serial driver cleanup I realised that TTY uses speed_t type for baud rates. What is the appropriate use of it? Either it is going to be killed (replaced with POD), or should / may we spread it over tty/serial and further?

As it's a uapi interface we can't just delete it entirely, but please, do not spread it any further, and try to clean up what places in the kernel itself that we can to use a "real" type that we know the size of at all times (i.e. u32/u64), not just having to guess like we do today.

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg Kroah-Hartman
Quoted 6 lines · Andy Shevchenko

Hi!

Recently while doing some serial driver cleanup I realised that TTY uses speed_t type for baud rates. What is the appropriate use of it? Either it is going to be killed (replaced with POD), or should / may we spread it over tty/serial and further?

Quoted 4 lines

As it's a uapi interface we can't just delete it entirely, but please, do not spread it any further, and try to clean up what places in the kernel itself that we can to use a "real" type that we know the size of at all times (i.e. u32/u64), not just having to guess like we do today.

Thank you for clarification!

Signature · 2 lines
With Best Regards,
Andy Shevchenko