[PATCH 08/45] tty: vt: make vc_is_sel()'s vc const

From: Jiri Slaby (SUSE)
Date: Thu Jan 18 2024 - 03:00:12 EST


It's only an aid to people reading the header and/or calling
vc_is_sel(). vc is only tested there, so having it const makes sense.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@xxxxxxxxxx>
---
drivers/tty/vt/selection.c | 2 +-
include/linux/selection.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 91d789c025c6..34ee09f5a8f4 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -88,7 +88,7 @@ void clear_selection(void)
}
EXPORT_SYMBOL_GPL(clear_selection);

-bool vc_is_sel(struct vc_data *vc)
+bool vc_is_sel(const struct vc_data *vc)
{
return vc == vc_sel.cons;
}
diff --git a/include/linux/selection.h b/include/linux/selection.h
index b7cd23e56a2b..533509f6ba4f 100644
--- a/include/linux/selection.h
+++ b/include/linux/selection.h
@@ -24,7 +24,7 @@ extern int sel_loadlut(u32 __user *lut);
extern int mouse_reporting(void);
extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);

-bool vc_is_sel(struct vc_data *vc);
+bool vc_is_sel(const struct vc_data *vc);

extern int console_blanked;

--
2.43.0