From 5cefa9bc518f187106c6bba4600e5c6dd61de91f Mon Sep 17 00:00:00 2001 From: Swark Yang Date: Thu, 3 Sep 2026 00:17:53 -0700 Subject: [PATCH] mailbox: axiado: fix debugfs name truncation warning kernel test robot reported a format-truncation warning for the snprintf() that builds each channel's debugfs entry name: drivers/mailbox/axiado-mailbox.c:325:39: warning: '-errors' directive output may be truncated writing 7 bytes into a region of size between 2 and 11 [-Wformat-truncation=] AX3005 exposes 16 mailbox channels, so the longest name generated at runtime is "chan15-errors" and already fits in the original buffer. However, the compiler cannot infer that bound from drv_data->num_chans and therefore assumes the unsigned channel index may require up to 10 decimal digits. Widen the buffer to 32 bytes, which removes the -Wformat-truncation warning with no functional change. Fixes: 14af7a96afa3 ("mailbox: add Axiado AX3005 mailbox driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202608250447.gGkRwNAl-lkp@intel.com/ Signed-off-by: Swark Yang Signed-off-by: Jassi Brar --- drivers/mailbox/axiado-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/axiado-mailbox.c b/drivers/mailbox/axiado-mailbox.c index aa1dcc1b267d..a87693c639dc 100644 --- a/drivers/mailbox/axiado-mailbox.c +++ b/drivers/mailbox/axiado-mailbox.c @@ -379,7 +379,7 @@ static int axiado_mbox_probe(struct platform_device *pdev) return ret; for (i = 0; i < drv_data->num_chans; i++) { - char name[16]; + char name[32]; ch_data[i].channel_num = i; ch_data[i].chan = &mb->mbox.chans[i];