Re: [PATCH] tty: serial: samsung_tty: fix -Wformat-overflow warnings for clk_name

From: Krzysztof Kozlowski

Date: Sun Nov 22 2026 - 09:13:43 EST


On 21/11/2026 20:21, Bramuel Barack wrote:
> MAX_CLK_NAME_LENGTH is currently 15, which only leaves room for a
> single-digit index after the 13-character "clk_uart_baud" prefix and
> terminating NUL byte. Because the clock indices (cnt, clk_num, clk_sel)
> are u8 values (0-255), building with W=1 triggers -Werror=format-overflow

They are not 0-255.

https://lore.kernel.org/all/20240605040719.160778-1-k.son@xxxxxxxxxxx/

> warnings at the sprintf() call sites.

Best regards,
Krzysztof