* [PATCH 00/15] speakup updates
@ 2026-05-31 23:07 Samuel Thibault
2026-05-31 23:07 ` [PATCH 01/15] accessibility/speakup/speakup_acnt: Add header file macro definition Samuel Thibault
` (15 more replies)
0 siblings, 16 replies; 18+ messages in thread
From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw)
To: gregkh; +Cc: Samuel Thibault, linux-kernel, w.d.hubbs, kirk
Hello,
This includes various patches that have piled up.
Samuel
Bastien Nocera (3):
speakup: Fix spelling of "re-enable"
speakup: Fix incorrect "index" plural
speakup: Fix typo in a speakup message
Bo Liu (1):
Accessibility: speakup_soft: Fix double word in comments
Christophe JAILLET (1):
accessibility: speakup: Fix incorrect string length computation in
report_char_chartab_status()
Francisco Maestre (1):
speakup: speakup_soft: fix comment style and repeated word
Haoxiang Li (1):
accessibility: speakup: unregister tty ldisc on later init failures
Jagadeesh Yalapalli (1):
speakup: Standardize character attribute types to u16
Li zeming (2):
accessibility/speakup/speakup_acnt: Add header file macro definition
accessibility/speakup/speakup_dtlk: Add header file macro definition
Pavel Zhigulin (1):
speakup: keyhelp: guard letter_offsets possible out-of-range indexing
Xichao Zhao (1):
accessibility: Use str_plural() to simplify the code
Xu Panda (1):
speakup/utils: use "!P" instead of "P == 0"
bajing (1):
speakup: genmap: remove redundant post-increment
liujing (1):
speakup: Fix the wrong format specifier
drivers/accessibility/speakup/fakekey.c | 4 +-
drivers/accessibility/speakup/genmap.c | 3 +-
drivers/accessibility/speakup/i18n.c | 2 +-
drivers/accessibility/speakup/keyhelp.c | 27 ++++---
drivers/accessibility/speakup/kobjects.c | 14 ++--
drivers/accessibility/speakup/main.c | 75 ++++++++++---------
drivers/accessibility/speakup/selection.c | 2 +-
drivers/accessibility/speakup/speakup.h | 10 +--
drivers/accessibility/speakup/speakup_acnt.h | 3 +
drivers/accessibility/speakup/speakup_decpc.c | 2 +-
drivers/accessibility/speakup/speakup_dtlk.h | 5 +-
drivers/accessibility/speakup/speakup_soft.c | 5 +-
drivers/accessibility/speakup/spk_types.h | 2 +-
drivers/accessibility/speakup/synth.c | 4 +-
drivers/accessibility/speakup/utils.h | 2 +-
15 files changed, 87 insertions(+), 73 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH 01/15] accessibility/speakup/speakup_acnt: Add header file macro definition 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 02/15] accessibility/speakup/speakup_dtlk: " Samuel Thibault ` (14 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Li zeming, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Li zeming <zeming@nfschina.com> I think the header file could avoid redefinition errors. at compile time by adding macro definitions. Signed-off-by: Li zeming <zeming@nfschina.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/speakup_acnt.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/accessibility/speakup/speakup_acnt.h b/drivers/accessibility/speakup/speakup_acnt.h index cffa938ae580..cea05d770f6d 100644 --- a/drivers/accessibility/speakup/speakup_acnt.h +++ b/drivers/accessibility/speakup/speakup_acnt.h @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* speakup_acntpc.h - header file for speakups Accent-PC driver. */ +#ifndef _SPEAKUP_ACNT_H +#define _SPEAKUP_ACNT_H #define SYNTH_IO_EXTENT 0x02 @@ -17,3 +19,4 @@ #define SYNTH_FULL 'F' /* synth is full. */ #define SYNTH_ALMOST_EMPTY 'M' /* synth has less than 2 seconds of text left */ #define SYNTH_SPEAKING 's' /* synth is speaking and has a fare way to go */ +#endif -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 02/15] accessibility/speakup/speakup_dtlk: Add header file macro definition 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault 2026-05-31 23:07 ` [PATCH 01/15] accessibility/speakup/speakup_acnt: Add header file macro definition Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 03/15] speakup/utils: use "!P" instead of "P == 0" Samuel Thibault ` (13 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Li zeming, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Li zeming <zeming@nfschina.com> Add header file macro definition. Signed-off-by: Li zeming <zeming@nfschina.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/speakup_dtlk.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/accessibility/speakup/speakup_dtlk.h b/drivers/accessibility/speakup/speakup_dtlk.h index 9c378b58066e..101848edec2e 100644 --- a/drivers/accessibility/speakup/speakup_dtlk.h +++ b/drivers/accessibility/speakup/speakup_dtlk.h @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* speakup_dtlk.h - header file for speakups DoubleTalk driver. */ +#ifndef _SPEAKUP_DTLK_H +#define _SPEAKUP_DTLK_H #define SYNTH_IO_EXTENT 0x02 #define SYNTH_CLEAR 0x18 /* stops speech */ @@ -61,3 +63,4 @@ struct synth_settings { */ u_char has_indexing; /* nonzero if indexing is implemented */ }; +#endif -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 03/15] speakup/utils: use "!P" instead of "P == 0" 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault 2026-05-31 23:07 ` [PATCH 01/15] accessibility/speakup/speakup_acnt: Add header file macro definition Samuel Thibault 2026-05-31 23:07 ` [PATCH 02/15] accessibility/speakup/speakup_dtlk: " Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 04/15] accessibility: speakup: Fix incorrect string length computation in report_char_chartab_status() Samuel Thibault ` (12 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Xu Panda, linux-kernel, w.d.hubbs, kirk, Zeal Robot, Samuel Thibault From: Xu Panda <xu.panda@zte.com.cn> comparing pointer to 0, use !P instead of it. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Xu Panda <xu.panda@zte.com.cn> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/utils.h b/drivers/accessibility/speakup/utils.h index 4ce9a12f7664..db00c962f8e2 100644 --- a/drivers/accessibility/speakup/utils.h +++ b/drivers/accessibility/speakup/utils.h @@ -36,7 +36,7 @@ static inline void open_input(const char *dir_name, const char *name) else snprintf(filename, sizeof(filename), "%s", name); infile = fopen(filename, "r"); - if (infile == 0) { + if (!infile) { fprintf(stderr, "can't open %s\n", filename); exit(1); } -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 04/15] accessibility: speakup: Fix incorrect string length computation in report_char_chartab_status() 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (2 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 03/15] speakup/utils: use "!P" instead of "P == 0" Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 05/15] speakup: genmap: remove redundant post-increment Samuel Thibault ` (11 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Christophe JAILLET, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> snprintf() returns the "number of characters which *would* be generated for the given input", not the size *really* generated. In order to avoid too large values for 'len' (and potential negative values for "sizeof(buf) - (len - 1)") use scnprintf() instead of snprintf(). Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/kobjects.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c index 0dfdb6608e02..943ef71b1329 100644 --- a/drivers/accessibility/speakup/kobjects.c +++ b/drivers/accessibility/speakup/kobjects.c @@ -92,9 +92,9 @@ static void report_char_chartab_status(int reset, int received, int used, if (reset) { pr_info("%s reset to defaults\n", object_type[do_characters]); } else if (received) { - len = snprintf(buf, sizeof(buf), - " updated %d of %d %s\n", - used, received, object_type[do_characters]); + len = scnprintf(buf, sizeof(buf), + " updated %d of %d %s\n", + used, received, object_type[do_characters]); if (rejected) snprintf(buf + (len - 1), sizeof(buf) - (len - 1), " with %d reject%s\n", -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 05/15] speakup: genmap: remove redundant post-increment 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (3 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 04/15] accessibility: speakup: Fix incorrect string length computation in report_char_chartab_status() Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 06/15] speakup: Fix the wrong format specifier Samuel Thibault ` (10 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: bajing, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: bajing <bajing@cmss.chinamobile.com> In the while loop, the variable lc is unused and is reinitialized later, so this redundant operation should be removed. Signed-off-by: bajing <bajing@cmss.chinamobile.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/genmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/accessibility/speakup/genmap.c b/drivers/accessibility/speakup/genmap.c index 0882bab10fb8..8a5125db471e 100644 --- a/drivers/accessibility/speakup/genmap.c +++ b/drivers/accessibility/speakup/genmap.c @@ -71,7 +71,6 @@ main(int argc, char *argv[]) open_input(NULL, argv[1]); while (fgets(buffer, sizeof(buffer), infile)) { - lc++; value = shift_state = 0; cp = strtok(buffer, delims); -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 06/15] speakup: Fix the wrong format specifier 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (4 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 05/15] speakup: genmap: remove redundant post-increment Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 07/15] speakup: Standardize character attribute types to u16 Samuel Thibault ` (9 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: liujing, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: liujing <liujing@cmss.chinamobile.com> Make a minor change to eliminate a static checker warning. The type of '(unsigned int)kp[i]' is unsigned int, so the correct format specifier should be %u instead of %d. Signed-off-by: liujing <liujing@cmss.chinamobile.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/genmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/genmap.c b/drivers/accessibility/speakup/genmap.c index 8a5125db471e..a9e308bdd0be 100644 --- a/drivers/accessibility/speakup/genmap.c +++ b/drivers/accessibility/speakup/genmap.c @@ -152,7 +152,7 @@ main(int argc, char *argv[]) continue; printf("\n\t%d,", lc); for (i = 0; i < max_states; i++) - printf(" %d,", (unsigned int)kp[i]); + printf(" %u,", (unsigned int)kp[i]); } printf("\n\t0, %d\n", map_ver); -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 07/15] speakup: Standardize character attribute types to u16 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (5 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 06/15] speakup: Fix the wrong format specifier Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 08/15] accessibility: Use str_plural() to simplify the code Samuel Thibault ` (8 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Jagadeesh Yalapalli, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Jagadeesh Yalapalli <jagadeesh.yalapalli@einfochips.com> This change replaces non-portable `u_short` types with standardized `u16` throughout the speakup subsystem to ensure: 1. Consistent 16-bit width across all architectures. 2. Improved code portability and readability. 3. Elimination of platform-dependent type sizes. 4. Safe bitwise operations without sign-extension risks. Signed-off-by: Jagadeesh Yalapalli <jagadeesh.yalapalli@einfochips.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/keyhelp.c | 10 +-- drivers/accessibility/speakup/kobjects.c | 4 +- drivers/accessibility/speakup/main.c | 74 ++++++++++---------- drivers/accessibility/speakup/selection.c | 2 +- drivers/accessibility/speakup/speakup.h | 10 +-- drivers/accessibility/speakup/speakup_dtlk.h | 2 +- drivers/accessibility/speakup/spk_types.h | 2 +- drivers/accessibility/speakup/synth.c | 2 +- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/drivers/accessibility/speakup/keyhelp.c b/drivers/accessibility/speakup/keyhelp.c index 822ceac83068..9c6e488adc2a 100644 --- a/drivers/accessibility/speakup/keyhelp.c +++ b/drivers/accessibility/speakup/keyhelp.c @@ -14,8 +14,8 @@ #define MAXFUNCS 130 #define MAXKEYS 256 static const int num_key_names = MSG_KEYNAMES_END - MSG_KEYNAMES_START + 1; -static u_short key_offsets[MAXFUNCS], key_data[MAXKEYS]; -static u_short masks[] = { 32, 16, 8, 4, 2, 1 }; +static u16 key_offsets[MAXFUNCS], key_data[MAXKEYS]; +static u16 masks[] = { 32, 16, 8, 4, 2, 1 }; static short letter_offsets[26] = { -1, -1, -1, -1, -1, -1, -1, -1, @@ -49,7 +49,7 @@ static int cur_item, nstates; static void build_key_data(void) { u_char *kp, counters[MAXFUNCS], ch, ch1; - u_short *p_key, key; + u16 *p_key, key; int i, offset = 1; nstates = (int)(state_tbl[-1]); @@ -129,12 +129,12 @@ static int help_init(void) return 0; } -int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key) +int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key) { int i, n; char *name; u_char func, *kp; - u_short *p_keys, val; + u16 *p_keys, val; if (letter_offsets[0] == -1) help_init(); diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c index 943ef71b1329..9ff7a4c680db 100644 --- a/drivers/accessibility/speakup/kobjects.c +++ b/drivers/accessibility/speakup/kobjects.c @@ -120,7 +120,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj, ssize_t retval = count; unsigned long flags; unsigned long index = 0; - int charclass = 0; + u16 charclass = 0; int received = 0; int used = 0; int rejected = 0; @@ -461,7 +461,7 @@ static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr, struct st_var_header *p_header; struct punc_var_t *var; struct st_bits_data *pb; - short mask; + u16 mask; unsigned long flags; p_header = spk_var_header_by_name(attr->attr.name); diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c index 78a77dd789a2..0962741a2ca2 100644 --- a/drivers/accessibility/speakup/main.c +++ b/drivers/accessibility/speakup/main.c @@ -63,7 +63,7 @@ int spk_attrib_bleep, spk_bleeps, spk_bleep_time = 10; int spk_no_intr, spk_spell_delay; int spk_key_echo, spk_say_word_ctl; int spk_say_ctrl, spk_bell_pos; -short spk_punc_mask; +u16 spk_punc_mask; int spk_punc_level, spk_reading_punc; int spk_cur_phonetic; char spk_str_caps_start[MAXVARLEN + 1] = "\0"; @@ -183,13 +183,13 @@ char *spk_default_chars[256] = { /* 251 */ "u circumflex", "u oomlaut", "y acute", "thorn", "y oomlaut" }; -/* array of 256 u_short (one for each character) +/* array of 256 u16 (one for each character) * initialized to default_chartab and user selectable via * /sys/module/speakup/parameters/chartab */ -u_short spk_chartab[256]; +u16 spk_chartab[256]; -static u_short default_chartab[256] = { +static u16 default_chartab[256] = { B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 0-7 */ B_CTL, B_CTL, A_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 8-15 */ B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /*16-23 */ @@ -267,10 +267,10 @@ static void speakup_date(struct vc_data *vc) spk_y = spk_cy = vc->state.y; spk_pos = spk_cp = vc->vc_pos; spk_old_attr = spk_attr; - spk_attr = get_attributes(vc, (u_short *)spk_pos); + spk_attr = get_attributes(vc, (u16 *)spk_pos); } -static void bleep(u_short val) +static void bleep(u16 val) { static const short vals[] = { 350, 370, 392, 414, 440, 466, 491, 523, 554, 587, 619, 659 @@ -346,14 +346,14 @@ static void speakup_cut(struct vc_data *vc) if (!mark_cut_flag) { mark_cut_flag = 1; - spk_xs = (u_short)spk_x; - spk_ys = (u_short)spk_y; + spk_xs = (u16)spk_x; + spk_ys = (u16)spk_y; spk_sel_cons = vc; synth_printf("%s\n", spk_msg_get(MSG_MARK)); return; } - spk_xe = (u_short)spk_x; - spk_ye = (u_short)spk_y; + spk_xe = (u16)spk_x; + spk_ye = (u16)spk_y; mark_cut_flag = 0; synth_printf("%s\n", spk_msg_get(MSG_CUT)); @@ -482,7 +482,7 @@ static void say_char(struct vc_data *vc) u16 ch; spk_old_attr = spk_attr; - ch = get_char(vc, (u_short *)spk_pos, &spk_attr); + ch = get_char(vc, (u16 *)spk_pos, &spk_attr); if (spk_attr != spk_old_attr) { if (spk_attrib_bleep & 1) bleep(spk_y); @@ -497,7 +497,7 @@ static void say_phonetic_char(struct vc_data *vc) u16 ch; spk_old_attr = spk_attr; - ch = get_char(vc, (u_short *)spk_pos, &spk_attr); + ch = get_char(vc, (u16 *)spk_pos, &spk_attr); if (ch <= 0x7f && isalpha(ch)) { ch &= 0x1f; synth_printf("%s\n", phonetic[--ch]); @@ -549,7 +549,7 @@ static u_long get_word(struct vc_data *vc) u_char temp; spk_old_attr = spk_attr; - ch = get_char(vc, (u_short *)tmp_pos, &temp); + ch = get_char(vc, (u16 *)tmp_pos, &temp); /* decided to take out the sayword if on a space (mis-information */ if (spk_say_word_ctl && ch == SPACE) { @@ -558,26 +558,26 @@ static u_long get_word(struct vc_data *vc) return 0; } else if (tmpx < vc->vc_cols - 2 && (ch == SPACE || ch == 0 || (ch < 0x100 && IS_WDLM(ch))) && - get_char(vc, (u_short *)tmp_pos + 1, &temp) > SPACE) { + get_char(vc, (u16 *)tmp_pos + 1, &temp) > SPACE) { tmp_pos += 2; tmpx++; } else { while (tmpx > 0) { - ch = get_char(vc, (u_short *)tmp_pos - 1, &temp); + ch = get_char(vc, (u16 *)tmp_pos - 1, &temp); if ((ch == SPACE || ch == 0 || (ch < 0x100 && IS_WDLM(ch))) && - get_char(vc, (u_short *)tmp_pos, &temp) > SPACE) + get_char(vc, (u16 *)tmp_pos, &temp) > SPACE) break; tmp_pos -= 2; tmpx--; } } - attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr); + attr_ch = get_char(vc, (u16 *)tmp_pos, &spk_attr); buf[cnt++] = attr_ch; while (tmpx < vc->vc_cols - 1 && cnt < ARRAY_SIZE(buf) - 1) { tmp_pos += 2; tmpx++; - ch = get_char(vc, (u_short *)tmp_pos, &temp); + ch = get_char(vc, (u16 *)tmp_pos, &temp); if (ch == SPACE || ch == 0 || (buf[cnt - 1] < 0x100 && IS_WDLM(buf[cnt - 1]) && ch > SPACE)) @@ -591,7 +591,7 @@ static u_long get_word(struct vc_data *vc) static void say_word(struct vc_data *vc) { u_long cnt = get_word(vc); - u_short saved_punc_mask = spk_punc_mask; + u16 saved_punc_mask = spk_punc_mask; if (cnt == 0) return; @@ -606,7 +606,7 @@ static void say_prev_word(struct vc_data *vc) u_char temp; u16 ch; enum edge edge_said = edge_none; - u_short last_state = 0, state = 0; + u16 last_state = 0, state = 0; spk_parked |= 0x01; @@ -635,7 +635,7 @@ static void say_prev_word(struct vc_data *vc) spk_x--; } spk_pos -= 2; - ch = get_char(vc, (u_short *)spk_pos, &temp); + ch = get_char(vc, (u16 *)spk_pos, &temp); if (ch == SPACE || ch == 0) state = 0; else if (ch < 0x100 && IS_WDLM(ch)) @@ -661,7 +661,7 @@ static void say_next_word(struct vc_data *vc) u_char temp; u16 ch; enum edge edge_said = edge_none; - u_short last_state = 2, state = 0; + u16 last_state = 2, state = 0; spk_parked |= 0x01; if (spk_x == vc->vc_cols - 1 && spk_y == vc->vc_rows - 1) { @@ -669,7 +669,7 @@ static void say_next_word(struct vc_data *vc) return; } while (1) { - ch = get_char(vc, (u_short *)spk_pos, &temp); + ch = get_char(vc, (u16 *)spk_pos, &temp); if (ch == SPACE || ch == 0) state = 0; else if (ch < 0x100 && IS_WDLM(ch)) @@ -755,9 +755,9 @@ static int get_line(struct vc_data *vc) u_char tmp2; spk_old_attr = spk_attr; - spk_attr = get_attributes(vc, (u_short *)spk_pos); + spk_attr = get_attributes(vc, (u16 *)spk_pos); for (i = 0; i < vc->vc_cols; i++) { - buf[i] = get_char(vc, (u_short *)tmp, &tmp2); + buf[i] = get_char(vc, (u16 *)tmp, &tmp2); tmp += 2; } for (--i; i >= 0; i--) @@ -770,7 +770,7 @@ static void say_line(struct vc_data *vc) { int i = get_line(vc); u16 *cp; - u_short saved_punc_mask = spk_punc_mask; + u16 saved_punc_mask = spk_punc_mask; if (i == 0) { synth_printf("%s\n", spk_msg_get(MSG_BLANK)); @@ -817,12 +817,12 @@ static int say_from_to(struct vc_data *vc, u_long from, u_long to, { int i = 0; u_char tmp; - u_short saved_punc_mask = spk_punc_mask; + u16 saved_punc_mask = spk_punc_mask; spk_old_attr = spk_attr; - spk_attr = get_attributes(vc, (u_short *)from); + spk_attr = get_attributes(vc, (u16 *)from); while (from < to) { - buf[i++] = get_char(vc, (u_short *)from, &tmp); + buf[i++] = get_char(vc, (u16 *)from, &tmp); from += 2; if (i >= vc->vc_size_row) break; @@ -895,10 +895,10 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc) sentmarks[bn][0] = &sentbuf[bn][0]; i = 0; spk_old_attr = spk_attr; - spk_attr = get_attributes(vc, (u_short *)start); + spk_attr = get_attributes(vc, (u16 *)start); while (start < end) { - sentbuf[bn][i] = get_char(vc, (u_short *)start, &tmp); + sentbuf[bn][i] = get_char(vc, (u16 *)start, &tmp); if (i > 0) { if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' && @@ -1047,7 +1047,7 @@ static void say_position(struct vc_data *vc) static void say_char_num(struct vc_data *vc) { u_char tmp; - u16 ch = get_char(vc, (u_short *)spk_pos, &tmp); + u16 ch = get_char(vc, (u16 *)spk_pos, &tmp); synth_printf(spk_msg_get(MSG_CHAR_INFO), ch, ch); } @@ -1080,7 +1080,7 @@ static void spkup_write(const u16 *in_buf, int count) { static int rep_count; static u16 ch = '\0', old_ch = '\0'; - static u_short char_type, last_type; + static u16 char_type, last_type; int in_count = count; spk_keydown = 0; @@ -1325,9 +1325,9 @@ void spk_reset_default_chartab(void) static const struct st_bits_data *pb_edit; -static int edit_bits(struct vc_data *vc, u_char type, u_char ch, u_short key) +static int edit_bits(struct vc_data *vc, u_char type, u_char ch, u16 key) { - short mask = pb_edit->mask, ch_type = spk_chartab[ch]; + u16 mask = pb_edit->mask, ch_type = spk_chartab[ch]; if (type != KT_LATIN || (ch_type & B_NUM) || ch < SPACE) return -1; @@ -1947,7 +1947,7 @@ static void speakup_bits(struct vc_data *vc) spk_special_handler = edit_bits; } -static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key) +static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u16 key) { static u_char goto_buf[8]; static int num; @@ -2105,7 +2105,7 @@ static void do_spkup(struct vc_data *vc, u_char value) static const char *pad_chars = "0123456789+-*/\015,.?()"; static int -speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, +speakup_key(struct vc_data *vc, int shift_state, int keycode, u16 keysym, int up_flag) { unsigned long flags; diff --git a/drivers/accessibility/speakup/selection.c b/drivers/accessibility/speakup/selection.c index 7df7afad5ab4..1713ce4e0ba5 100644 --- a/drivers/accessibility/speakup/selection.c +++ b/drivers/accessibility/speakup/selection.c @@ -13,7 +13,7 @@ #include "speakup.h" -unsigned short spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */ +u16 spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */ struct vc_data *spk_sel_cons; struct speakup_selection_work { diff --git a/drivers/accessibility/speakup/speakup.h b/drivers/accessibility/speakup/speakup.h index 54f1226ea061..984a729fd82d 100644 --- a/drivers/accessibility/speakup/speakup.h +++ b/drivers/accessibility/speakup/speakup.h @@ -62,7 +62,7 @@ int spk_set_num_var(int val, struct st_var_header *var, int how); int spk_set_string_var(const char *page, struct st_var_header *var, int len); int spk_set_mask_bits(const char *input, const int which, const int how); extern special_func spk_special_handler; -int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key); +int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key); int synth_init(char *name); void synth_release(void); @@ -82,7 +82,7 @@ void synth_writeu(const char *buf, size_t count); int synth_supports_indexing(void); extern struct vc_data *spk_sel_cons; -extern unsigned short spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */ +extern u16 spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */ extern wait_queue_head_t speakup_event; extern struct kobject *speakup_kobj; @@ -95,20 +95,20 @@ extern struct st_spk_t *speakup_console[]; extern struct spk_synth *synth; extern char spk_pitch_buff[]; extern u_char *spk_our_keys[]; -extern short spk_punc_masks[]; +extern u16 spk_punc_masks[]; extern char spk_str_caps_start[], spk_str_caps_stop[], spk_str_pause[]; extern bool spk_paused; extern const struct st_bits_data spk_punc_info[]; extern u_char spk_key_buf[600]; extern char *spk_characters[]; extern char *spk_default_chars[]; -extern u_short spk_chartab[]; +extern u16 spk_chartab[]; extern int spk_no_intr, spk_say_ctrl, spk_say_word_ctl, spk_punc_level; extern int spk_reading_punc, spk_attrib_bleep, spk_bleeps; extern int spk_bleep_time, spk_bell_pos; extern int spk_spell_delay, spk_key_echo; extern int spk_cur_phonetic; -extern short spk_punc_mask; +extern u16 spk_punc_mask; extern short spk_pitch_shift, synth_flags; extern bool spk_quiet_boot; extern char *synth_name; diff --git a/drivers/accessibility/speakup/speakup_dtlk.h b/drivers/accessibility/speakup/speakup_dtlk.h index 101848edec2e..9354e3382bba 100644 --- a/drivers/accessibility/speakup/speakup_dtlk.h +++ b/drivers/accessibility/speakup/speakup_dtlk.h @@ -41,7 +41,7 @@ /* data returned by Interrogate command */ struct synth_settings { - u_short serial_number; /* 0-7Fh:0-7Fh */ + u16 serial_number; /* 0-7Fh:0-7Fh */ u_char rom_version[24]; /* null terminated string */ u_char mode; /* 0=Character; 1=Phoneme; 2=Text */ u_char punc_level; /* nB; 0-7 */ diff --git a/drivers/accessibility/speakup/spk_types.h b/drivers/accessibility/speakup/spk_types.h index 08011518a28a..a5762330e249 100644 --- a/drivers/accessibility/speakup/spk_types.h +++ b/drivers/accessibility/speakup/spk_types.h @@ -53,7 +53,7 @@ enum var_id_t { }; typedef int (*special_func)(struct vc_data *vc, u_char type, u_char ch, - u_short key); + u16 key); #define COLOR_BUFFER_SIZE 160 diff --git a/drivers/accessibility/speakup/synth.c b/drivers/accessibility/speakup/synth.c index d8addbf3ad0d..d1ec1a7eb160 100644 --- a/drivers/accessibility/speakup/synth.c +++ b/drivers/accessibility/speakup/synth.c @@ -574,4 +574,4 @@ struct spk_synth *synth_current(void) } EXPORT_SYMBOL_GPL(synth_current); -short spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC | B_SYM }; +u16 spk_punc_masks[] = { 0, SOME, MOST, PUNC, PUNC | B_SYM }; -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 08/15] accessibility: Use str_plural() to simplify the code 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (6 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 07/15] speakup: Standardize character attribute types to u16 Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 09/15] speakup: keyhelp: guard letter_offsets possible out-of-range indexing Samuel Thibault ` (7 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Xichao Zhao, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Xichao Zhao <zhao.xichao@vivo.com> Use the string choice helper function str_plural() to simplify the code. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/kobjects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c index 9ff7a4c680db..a73b478e06de 100644 --- a/drivers/accessibility/speakup/kobjects.c +++ b/drivers/accessibility/speakup/kobjects.c @@ -98,7 +98,7 @@ static void report_char_chartab_status(int reset, int received, int used, if (rejected) snprintf(buf + (len - 1), sizeof(buf) - (len - 1), " with %d reject%s\n", - rejected, rejected > 1 ? "s" : ""); + rejected, str_plural(rejected)); pr_info("%s", buf); } } @@ -740,7 +740,7 @@ static void report_msg_status(int reset, int received, int used, if (rejected) snprintf(buf + (len - 1), sizeof(buf) - (len - 1), " with %d reject%s\n", - rejected, rejected > 1 ? "s" : ""); + rejected, str_plural(rejected)); pr_info("%s", buf); } } -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 09/15] speakup: keyhelp: guard letter_offsets possible out-of-range indexing 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (7 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 08/15] accessibility: Use str_plural() to simplify the code Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:07 ` [PATCH 10/15] Accessibility: speakup_soft: Fix double word in comments Samuel Thibault ` (6 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Pavel Zhigulin, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Pavel Zhigulin <Pavel.Zhigulin@kaspersky.com> help_init() builds letter_offsets[] by using the first byte of each function name as an index via `(start & 31) - 1`. If function_names are overridden from sysfs (root) with a name starting outside [a–z], the index underflows or exceeds the array, leading to OOB write. Function names can be overridden with the following commands as root: modprobe speakup_soft echo "0 _bad" > /sys/accessibility/speakup/i18n/function_names # then press Insert+2 on /dev/tty This fix checks the first letter in help_init(), and if it is not in the [a–z] range the function returns an error to the caller. Eventually this error is propagated to drivers/accessibility/speakup/main.c:2217, which causes a bleep sound. Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory") Signed-off-by: Pavel Zhigulin <Pavel.Zhigulin@kaspersky.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/keyhelp.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/accessibility/speakup/keyhelp.c b/drivers/accessibility/speakup/keyhelp.c index 9c6e488adc2a..0940f430ac0f 100644 --- a/drivers/accessibility/speakup/keyhelp.c +++ b/drivers/accessibility/speakup/keyhelp.c @@ -8,6 +8,7 @@ */ #include <linux/keyboard.h> +#include <linux/ctype.h> #include "spk_priv.h" #include "speakup.h" @@ -111,7 +112,7 @@ static void say_key(int key) spk_msg_get(MSG_KEYNAMES_START + (key - 1))); } -static int help_init(void) +static void help_init(void) { char start = SPACE; int i; @@ -120,13 +121,19 @@ static int help_init(void) state_tbl = spk_our_keys[0] + SHIFT_TBL_SIZE + 2; for (i = 0; i < num_funcs; i++) { char *cur_funcname = spk_msg_get(MSG_FUNCNAMES_START + i); + char first_letter; - if (start == *cur_funcname) + first_letter = tolower(*cur_funcname); + + /* Accept only 'a'..'z' to index letter_offsets[] safely */ + if (first_letter < 'a' || first_letter > 'z') + continue; + + if (start == first_letter) continue; - start = *cur_funcname; + start = first_letter; letter_offsets[(start & 31) - 1] = i; } - return 0; } int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key) @@ -144,7 +151,7 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u16 key) synth_printf("%s\n", spk_msg_get(MSG_LEAVING_HELP)); return 1; } - ch |= 32; /* lower case */ + ch = tolower(ch); if (ch < 'a' || ch > 'z') return -1; if (letter_offsets[ch - 'a'] == -1) { -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 10/15] Accessibility: speakup_soft: Fix double word in comments 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (8 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 09/15] speakup: keyhelp: guard letter_offsets possible out-of-range indexing Samuel Thibault @ 2026-05-31 23:07 ` Samuel Thibault 2026-05-31 23:08 ` [PATCH 11/15] speakup: Fix spelling of "re-enable" Samuel Thibault ` (5 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:07 UTC (permalink / raw) To: gregkh; +Cc: Bo Liu, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Bo Liu <liubo03@inspur.com> Remove the repeated word "the" in comments. Signed-off-by: Bo Liu <liubo03@inspur.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/speakup_soft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c index 6d446824677b..6549bfb96e7f 100644 --- a/drivers/accessibility/speakup/speakup_soft.c +++ b/drivers/accessibility/speakup/speakup_soft.c @@ -446,7 +446,7 @@ static int softsynth_adjust(struct spk_synth *synth, struct st_var_header *var) if (var->var_id != PUNC_LEVEL) return 0; - /* We want to set the the speech synthesis punctuation level + /* We want to set the speech synthesis punctuation level * accordingly, so it properly tunes speaking A_PUNC characters */ var_data = var->data; if (!var_data) -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 11/15] speakup: Fix spelling of "re-enable" 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (9 preceding siblings ...) 2026-05-31 23:07 ` [PATCH 10/15] Accessibility: speakup_soft: Fix double word in comments Samuel Thibault @ 2026-05-31 23:08 ` Samuel Thibault 2026-05-31 23:08 ` [PATCH 12/15] speakup: Fix incorrect "index" plural Samuel Thibault ` (4 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:08 UTC (permalink / raw) To: gregkh; +Cc: Bastien Nocera, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Bastien Nocera <hadess@hadess.net> Detected using codespell. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/fakekey.c | 4 ++-- drivers/accessibility/speakup/synth.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/accessibility/speakup/fakekey.c b/drivers/accessibility/speakup/fakekey.c index 868c47b2a59b..9c0b2403876a 100644 --- a/drivers/accessibility/speakup/fakekey.c +++ b/drivers/accessibility/speakup/fakekey.c @@ -71,9 +71,9 @@ void speakup_fake_down_arrow(void) input_sync(virt_keyboard); __this_cpu_write(reporting_keystroke, false); - /* reenable preemption */ + /* re-enable preemption */ preempt_enable(); - /* reenable keyboard interrupts */ + /* re-enable keyboard interrupts */ local_irq_restore(flags); } diff --git a/drivers/accessibility/speakup/synth.c b/drivers/accessibility/speakup/synth.c index d1ec1a7eb160..11cba1fd8715 100644 --- a/drivers/accessibility/speakup/synth.c +++ b/drivers/accessibility/speakup/synth.c @@ -163,7 +163,7 @@ int spk_synth_is_alive_restart(struct spk_synth *synth) /* restart */ synth->alive = 1; synth_printf("%s", synth->init); - return 2; /* reenabled */ + return 2; /* re-enabled */ } pr_warn("%s: can't restart synth\n", synth->long_name); return 0; -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 12/15] speakup: Fix incorrect "index" plural 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (10 preceding siblings ...) 2026-05-31 23:08 ` [PATCH 11/15] speakup: Fix spelling of "re-enable" Samuel Thibault @ 2026-05-31 23:08 ` Samuel Thibault 2026-05-31 23:08 ` [PATCH 13/15] speakup: Fix typo in a speakup message Samuel Thibault ` (3 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:08 UTC (permalink / raw) To: gregkh; +Cc: Bastien Nocera, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Bastien Nocera <hadess@hadess.net> It's indexes or indices. Given that the constant is called "STAT_index_valid", "indexes" was the preferred plural. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/speakup_decpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/speakup_decpc.c b/drivers/accessibility/speakup/speakup_decpc.c index 083ca9265805..1bf36d1e5477 100644 --- a/drivers/accessibility/speakup/speakup_decpc.c +++ b/drivers/accessibility/speakup/speakup_decpc.c @@ -41,7 +41,7 @@ #define STAT_new_index 0x0040 /* new last index ready */ #define STAT_new_status 0x0080 /* new status posted */ #define STAT_dma_state 0x0100 /* dma state toggle */ -#define STAT_index_valid 0x0200 /* indexs are valid */ +#define STAT_index_valid 0x0200 /* indexes are valid */ #define STAT_flushing 0x0400 /* flush in progress */ #define STAT_self_test 0x0800 /* module in self test */ #define MODE_ready 0xc000 /* module ready for next phase */ -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 13/15] speakup: Fix typo in a speakup message 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (11 preceding siblings ...) 2026-05-31 23:08 ` [PATCH 12/15] speakup: Fix incorrect "index" plural Samuel Thibault @ 2026-05-31 23:08 ` Samuel Thibault 2026-05-31 23:08 ` [PATCH 14/15] speakup: speakup_soft: fix comment style and repeated word Samuel Thibault ` (2 subsequent siblings) 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:08 UTC (permalink / raw) To: gregkh Cc: Bastien Nocera, linux-kernel, w.d.hubbs, kirk, Colin Ian King, Samuel Thibault From: Bastien Nocera <hadess@hadess.net> s/read windo/read window/ Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/i18n.c b/drivers/accessibility/speakup/i18n.c index d62079b1661f..554bf81f2c1c 100644 --- a/drivers/accessibility/speakup/i18n.c +++ b/drivers/accessibility/speakup/i18n.c @@ -31,7 +31,7 @@ static char *speakup_default_msgs[MSG_LAST_INDEX] = { [MSG_CURSORING_OFF] = "cursoring off", [MSG_CURSORING_ON] = "cursoring on", [MSG_HIGHLIGHT_TRACKING] = "highlight tracking", - [MSG_READ_WINDOW] = "read windo", + [MSG_READ_WINDOW] = "read window", [MSG_READ_ALL] = "read all", [MSG_EDIT_DONE] = "edit done", [MSG_WINDOW_ALREADY_SET] = "window already set, clear then reset", -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 14/15] speakup: speakup_soft: fix comment style and repeated word 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (12 preceding siblings ...) 2026-05-31 23:08 ` [PATCH 13/15] speakup: Fix typo in a speakup message Samuel Thibault @ 2026-05-31 23:08 ` Samuel Thibault 2026-05-31 23:08 ` [PATCH 15/15] accessibility: speakup: unregister tty ldisc on later init failures Samuel Thibault 2026-06-01 14:52 ` [PATCH 00/15] speakup updates Jonathan Corbet 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:08 UTC (permalink / raw) To: gregkh; +Cc: Francisco Maestre, linux-kernel, w.d.hubbs, kirk, Samuel Thibault From: Francisco Maestre <francisco@maestretorreblanca.com> Fix comment style issues in speakup_soft.c: - Move the closing '*/' of the block comment to its own line, as required by the kernel coding style Signed-off-by: Francisco Maestre <francisco@maestretorreblanca.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> --- drivers/accessibility/speakup/speakup_soft.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c index 6549bfb96e7f..57d83b82f1d1 100644 --- a/drivers/accessibility/speakup/speakup_soft.c +++ b/drivers/accessibility/speakup/speakup_soft.c @@ -447,7 +447,8 @@ static int softsynth_adjust(struct spk_synth *synth, struct st_var_header *var) return 0; /* We want to set the speech synthesis punctuation level - * accordingly, so it properly tunes speaking A_PUNC characters */ + * accordingly, so it properly tunes speaking A_PUNC characters + */ var_data = var->data; if (!var_data) return 0; -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 15/15] accessibility: speakup: unregister tty ldisc on later init failures 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (13 preceding siblings ...) 2026-05-31 23:08 ` [PATCH 14/15] speakup: speakup_soft: fix comment style and repeated word Samuel Thibault @ 2026-05-31 23:08 ` Samuel Thibault 2026-06-01 14:52 ` [PATCH 00/15] speakup updates Jonathan Corbet 15 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-05-31 23:08 UTC (permalink / raw) To: gregkh; +Cc: Haoxiang Li, linux-kernel, w.d.hubbs, kirk, Samuel Thibault, stable From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> The ldisc registration is intentionally non-fatal, since some synth drivers do not use tty/ldisc. However, once speakup_init() continues past the registration point and later fails, the init unwind path should mirror speakup_exit() and call spk_ttyio_unregister_ldisc(). Add the missing unregister call to the error path after synth_release(), matching the normal module exit cleanup order. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Fixes: e23a9b439ce9 ("staging: speakup: safely register and unregister ldisc") Cc: stable@vger.kernel.org --- drivers/accessibility/speakup/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c index 0962741a2ca2..e9b7c2761f6f 100644 --- a/drivers/accessibility/speakup/main.c +++ b/drivers/accessibility/speakup/main.c @@ -2444,6 +2444,7 @@ static int __init speakup_init(void) mutex_lock(&spk_mutex); synth_release(); mutex_unlock(&spk_mutex); + spk_ttyio_unregister_ldisc(); speakup_kobj_exit(); error_kobjects: -- 2.47.3 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 00/15] speakup updates 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault ` (14 preceding siblings ...) 2026-05-31 23:08 ` [PATCH 15/15] accessibility: speakup: unregister tty ldisc on later init failures Samuel Thibault @ 2026-06-01 14:52 ` Jonathan Corbet 2026-06-01 15:01 ` Samuel Thibault 15 siblings, 1 reply; 18+ messages in thread From: Jonathan Corbet @ 2026-06-01 14:52 UTC (permalink / raw) To: Samuel Thibault, gregkh; +Cc: Samuel Thibault, linux-kernel, w.d.hubbs, kirk Samuel Thibault <samuel.thibault@ens-lyon.org> writes: > Hello, > > This includes various patches that have piled up. So I hate to be obnoxious but ... is there any chance of getting Documentation/admin-guide/spkguide.txt moved to a GPL-compatible license? Thanks, jon ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 00/15] speakup updates 2026-06-01 14:52 ` [PATCH 00/15] speakup updates Jonathan Corbet @ 2026-06-01 15:01 ` Samuel Thibault 0 siblings, 0 replies; 18+ messages in thread From: Samuel Thibault @ 2026-06-01 15:01 UTC (permalink / raw) To: Jonathan Corbet; +Cc: gregkh, linux-kernel, w.d.hubbs, kirk Hello, Jonathan Corbet, le lun. 01 juin 2026 08:52:46 -0600, a ecrit: > Samuel Thibault <samuel.thibault@ens-lyon.org> writes: > > This includes various patches that have piled up. > > So I hate to be obnoxious but ... is there any chance of getting > Documentation/admin-guide/spkguide.txt moved to a GPL-compatible > license? That will probably be very hard. The author was quite old and I have not been able to contact him. He might not be here any more and I do not know who would now have authorship. With regards, Samuel ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2026-06-01 15:01 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-31 23:07 [PATCH 00/15] speakup updates Samuel Thibault 2026-05-31 23:07 ` [PATCH 01/15] accessibility/speakup/speakup_acnt: Add header file macro definition Samuel Thibault 2026-05-31 23:07 ` [PATCH 02/15] accessibility/speakup/speakup_dtlk: " Samuel Thibault 2026-05-31 23:07 ` [PATCH 03/15] speakup/utils: use "!P" instead of "P == 0" Samuel Thibault 2026-05-31 23:07 ` [PATCH 04/15] accessibility: speakup: Fix incorrect string length computation in report_char_chartab_status() Samuel Thibault 2026-05-31 23:07 ` [PATCH 05/15] speakup: genmap: remove redundant post-increment Samuel Thibault 2026-05-31 23:07 ` [PATCH 06/15] speakup: Fix the wrong format specifier Samuel Thibault 2026-05-31 23:07 ` [PATCH 07/15] speakup: Standardize character attribute types to u16 Samuel Thibault 2026-05-31 23:07 ` [PATCH 08/15] accessibility: Use str_plural() to simplify the code Samuel Thibault 2026-05-31 23:07 ` [PATCH 09/15] speakup: keyhelp: guard letter_offsets possible out-of-range indexing Samuel Thibault 2026-05-31 23:07 ` [PATCH 10/15] Accessibility: speakup_soft: Fix double word in comments Samuel Thibault 2026-05-31 23:08 ` [PATCH 11/15] speakup: Fix spelling of "re-enable" Samuel Thibault 2026-05-31 23:08 ` [PATCH 12/15] speakup: Fix incorrect "index" plural Samuel Thibault 2026-05-31 23:08 ` [PATCH 13/15] speakup: Fix typo in a speakup message Samuel Thibault 2026-05-31 23:08 ` [PATCH 14/15] speakup: speakup_soft: fix comment style and repeated word Samuel Thibault 2026-05-31 23:08 ` [PATCH 15/15] accessibility: speakup: unregister tty ldisc on later init failures Samuel Thibault 2026-06-01 14:52 ` [PATCH 00/15] speakup updates Jonathan Corbet 2026-06-01 15:01 ` Samuel Thibault
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.