[Devel] [PATCH RHEL9 COMMIT] ms/tty: Make tty_termios_copy_hw() old ktermios const
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Nov 3 21:03:16 MSK 2023
The commit is pushed to "branch-rh9-5.14.0-284.25.1.vz9.30.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-284.25.1.vz9.30.10
------>
commit 2c347ec6260211b4608e1b41d080d5c12839da24
Author: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
Date: Tue Aug 16 14:57:35 2022 +0300
ms/tty: Make tty_termios_copy_hw() old ktermios const
There should be no reason to adjust old ktermios which is going to get
discarded anyway.
Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
Link: https://lore.kernel.org/r/20220816115739.10928-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Getting rid of compilation warnings.
https://virtuozzo.atlassian.net/browse/PSBM-148793
Feature: fix ms/drivers
(cherry picked from commit d15f89d997d995c9a0bf5be5de4c1c405886f21c)
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
drivers/tty/tty_ioctl.c | 2 +-
include/linux/tty.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index b4db794a7c87..089501a2a916 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -249,7 +249,7 @@ static void unset_locked_termios(struct tty_struct *tty, const struct ktermios *
* in some cases where only minimal reconfiguration is supported
*/
-void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old)
+void tty_termios_copy_hw(struct ktermios *new, const struct ktermios *old)
{
/* The bits a dumb device handles in software. Smart devices need
to always provide a set_termios method */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 71bff77266f1..fcdb24613607 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -498,7 +498,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
unsigned char tty_get_char_size(unsigned int cflag);
unsigned char tty_get_frame_size(unsigned int cflag);
-extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
+extern void tty_termios_copy_hw(struct ktermios *new, const struct ktermios *old);
extern int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b);
extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
More information about the Devel
mailing list