mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
drm: verisilicon: suppress snprintf warning for pixel clock name
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@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202602060154.ONBYvM9m-lkp@intel.com/ Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260207013255.2075294-1-zhengxingda@iscas.ac.cn
This commit is contained in:
committed by
Thomas Zimmermann
parent
391ce961bc
commit
f2edbafc6c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user