From: Shuming Fan Date: Mon, 22 Dec 2025 10:13:29 +0000 (+0800) Subject: ASoC: rt1320: fix the warning the string may be truncated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db50f0fa43efe8799fd40b872dcdd39a90d7549;p=thirdparty%2Fkernel%2Flinux.git ASoC: rt1320: fix the warning the string may be truncated 1488 | "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku); | ^~ ~~~~~~ sound/soc/codecs/rt1320-sdw.c:1487:17: note: 'snprintf' output between 29 and 410 bytes into a destination of size 128 1487 | snprintf(filename, sizeof(filename), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1488 | "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku); | Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202512191521.RK0edKdX-lkp@intel.com/ Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20251222101329.558973-1-shumingf@realtek.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index e1c4a1adacff4..2c621d94fcf54 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1433,7 +1433,7 @@ static int rt1320_rae_load(struct rt1320_sdw_priv *rt1320) const char *dmi_vendor, *dmi_product, *dmi_sku; char vendor[128], product[128], sku[128]; char *ptr_vendor, *ptr_product, *ptr_sku; - char rae_filename[128]; + char rae_filename[512]; char tag[5]; int ret = 0; int retry = 200; @@ -1600,7 +1600,7 @@ struct rt1320_dspfwheader { const char *dmi_vendor, *dmi_product, *dmi_sku; char vendor[128], product[128], sku[128]; char *ptr_vendor, *ptr_product, *ptr_sku; - char filename[128]; + char filename[512]; switch (rt1320->dev_id) { case RT1320_DEV_ID: