Re: [PATCH] hwmon: pmbus: ibm-cffps: avoid format truncation warnings
From: Guenter Roeck
Date: Thu Sep 24 2026 - 13:28:04 EST
On Wed, Sep 23, 2026 at 04:48:27AM +0200, Eduard Zateev wrote:
> Building with W=1 reports format truncation warnings when formatting
> the firmware version values for debugfs.
>
> The SMBus helpers return the byte and word values as int, so the
> compiler cannot infer that the formatted values fit into the small
> temporary buffers. Cast the values to u8 and u16 before formatting
> them.
>
> This avoids the -Wformat-truncation warnings while keeping the existing
> output format unchanged.
>
> Signed-off-by: Eduard Zateev <hackerowskiy@xxxxxxxxx>
Applied.
Thanks,
Guenter