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

Krzysztof Kozlowski krzk at kernel.org
Sun Nov 22 06:13:30 PST 2026


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@samsung.com/

> warnings at the sprintf() call sites.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list