tty: Remove baudrate dead code & make ktermios params const
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 16 Aug 2022 11:57:32 +0000 (14:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2022 12:22:34 +0000 (14:22 +0200)
commit87888fb9ac0c71cdc1edd0779382052475dadb84
tree988f9f9b61119e7ed9db887a0996bbe41d734e06
parenteb9e109d010cb79ab01d8562e851d53bcecf059b
tty: Remove baudrate dead code & make ktermios params const

With the architectures currently in-tree, either:
  1) CBAUDEX is zero
  2) The earlier BOTHER if check covers cbaud < 1 case
  3) All CBAUD bits are covered by the baud_table

Thus, the check for cbaud being out-of-range for CBAUDEX case cannot
ever be true.

The ktermios parameters can now be made const.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220816115739.10928-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty.h
drivers/tty/tty_baudrate.c
include/linux/tty.h