Re: [PATCH 12/15] tty: convert THROTTLE constants into enum

From: Jiri Slaby
Date: Tue Sep 19 2023 - 06:51:20 EST


On 19. 09. 23, 12:10, Ilpo Järvinen wrote:
On Tue, 19 Sep 2023, Jiri Slaby (SUSE) wrote:

And make an explicit constant for zero too. This allows for easier type
checking of the parameter.

Note: tty_struct::flow_change is kept as int because include/tty.h
(tty_struct) doesn't see tty/tty.h (this enum).

And it cannot moved there because of what?

It's possible, but would make the constants "public". I hoped for forward enum declaration, but since enum is no longer a simple int, the compilation then fails with incomplete type of tty_struct.

thanks,
--
js
suse labs