From: Jiri Slaby <jirislaby@kernel.org>
To: Nicolas Pitre <nico@fluxnic.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolas Pitre <npitre@baylibre.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 13/13] vt: refresh ucs_width_table.h and adjust code in ucs.c accordingly
Date: Wed, 16 Apr 2025 07:12:45 +0200 [thread overview]
Message-ID: <7c3a13ce-c5df-4ea7-a3b1-32a13ab95274@kernel.org> (raw)
In-Reply-To: <20250415192212.33949-14-nico@fluxnic.net>
On 15. 04. 25, 21:18, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@baylibre.com>
>
> Width tables are now split into BMP (16-bit) and non-BMP (above 16-bit).
> This reduces the corresponding text size by 20-25%.
>
> Note: scripts/checkpatch.pl complains about "... exceeds 100 columns".
> Please ignore.
...
> --- a/drivers/tty/vt/ucs.c
> +++ b/drivers/tty/vt/ucs.c
> @@ -5,17 +5,34 @@
...
> -static int interval_cmp(const void *key, const void *element)
> +static int interval16_cmp(const void *key, const void *element)
> +{
> + u16 cp = *(u16 *)key;
You cast away const. Does the compiler not complain?
> + const struct ucs_interval16 *entry = element;
> +
> + if (cp < entry->first)
> + return -1;
> + if (cp > entry->last)
> + return 1;
> + return 0;
> +}
> +
> +static int interval32_cmp(const void *key, const void *element)
> {
> u32 cp = *(u32 *)key;
Apparently not, given we do this for ages. I wonder why?
Anyway:
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
--
js
suse labs
next prev parent reply other threads:[~2025-04-16 5:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 19:17 [PATCH v2 00/13] vt: implement proper Unicode handling Nicolas Pitre
2025-04-15 19:17 ` [PATCH v2 01/13] vt: minor cleanup to vc_translate_unicode() Nicolas Pitre
2025-04-16 3:41 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 02/13] vt: move unicode processing to a separate file Nicolas Pitre
2025-04-16 3:42 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 03/13] vt: properly support zero-width Unicode code points Nicolas Pitre
2025-04-16 3:45 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 04/13] vt: introduce gen_ucs_width_table.py to create ucs_width_table.h Nicolas Pitre
2025-04-16 4:14 ` Jiri Slaby
2025-04-16 4:19 ` Jiri Slaby
2025-04-16 13:21 ` Nicolas Pitre
2025-04-15 19:17 ` [PATCH v2 05/13] vt: create ucs_width_table.h with gen_ucs_width_table.py Nicolas Pitre
2025-04-16 4:20 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 06/13] vt: use new tables in ucs.c Nicolas Pitre
2025-04-16 4:22 ` Jiri Slaby
2025-04-17 8:30 ` kernel test robot
2025-04-15 19:17 ` [PATCH v2 07/13] vt: introduce gen_ucs_recompose_table.py to create ucs_recompose_table.h Nicolas Pitre
2025-04-16 4:29 ` Jiri Slaby
2025-04-16 13:17 ` Nicolas Pitre
2025-04-17 4:09 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 08/13] vt: create ucs_recompose_table.h with gen_ucs_recompose_table.py Nicolas Pitre
2025-04-16 5:05 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 09/13] vt: support Unicode recomposition Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 10/13] vt: pad double-width code points with a zero-width space Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 11/13] vt: remove zero-width-space handling from conv_uni_to_pc() Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 12/13] vt: update gen_ucs_width_table.py to make tables more space efficient Nicolas Pitre
2025-04-16 5:09 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 13/13] vt: refresh ucs_width_table.h and adjust code in ucs.c accordingly Nicolas Pitre
2025-04-16 5:12 ` Jiri Slaby [this message]
2025-04-16 13:09 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c3a13ce-c5df-4ea7-a3b1-32a13ab95274@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=npitre@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox