[PATCH drm-misc-next] drm: verisilicon: suppress snprintf warning for pixel clock name

From: Icenowy Zheng

Date: Fri Feb 06 2026 - 20:33:27 EST


Although it's generally expected that the pixel clock ID will only have
one decimal digit, this isn't enforced in vs_dc.c source code, and the
compiler will argue about the buffer being not long enough.

Enlarge the snprintf() buffer for generating pixel clock name to be
enough for a UINT_MAX pixel clock ID in order to suppress the compiler
warning.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202602060154.ONBYvM9m-lkp@xxxxxxxxx/
Signed-off-by: Icenowy Zheng <zhengxingda@xxxxxxxxxxx>
---
drivers/gpu/drm/verisilicon/vs_dc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/verisilicon/vs_dc.c b/drivers/gpu/drm/verisilicon/vs_dc.c
index ba1b3f261a3ae..5f629d2d4beac 100644
--- a/drivers/gpu/drm/verisilicon/vs_dc.c
+++ b/drivers/gpu/drm/verisilicon/vs_dc.c
@@ -46,8 +46,8 @@ static int vs_dc_probe(struct platform_device *pdev)
struct vs_dc *dc;
void __iomem *regs;
unsigned int port_count, i;
- /* pix0/pix1 */
- char pixclk_name[5];
+ /* pix%u */
+ char pixclk_name[14];
int irq, ret;

if (!dev->of_node) {
--
2.52.0