Hi Cheng, kernel test robot noticed the following build warnings: [auto build test WARNING on c245a7a79602ccbee780c004c1e4abcda66aec32] url: https://github.com/intel-lab-lkp/linux/commits/Cheng-Jiang/dt-bindings-net-bluetooth-qca-Expand-firmware-name-property/20241205-182449 base: c245a7a79602ccbee780c004c1e4abcda66aec32 patch link: https://lore.kernel.org/r/20241205102213.1281865-3-quic_chejiang%40quicinc.com patch subject: [PATCH v3 2/3] Bluetooth: qca: Expand firmware-name to load specific nvm and rampatch config: arm-randconfig-002-20241205 (https://download.01.org/0day-ci/archive/20241205/202412052157.4fOQCv3u-lkp@xxxxxxxxx/config) compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412052157.4fOQCv3u-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202412052157.4fOQCv3u-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): drivers/bluetooth/btqca.c: In function 'qca_get_nvm_name_by_board': >> drivers/bluetooth/btqca.c:775:21: warning: variable 'variant' set but not used [-Wunused-but-set-variable] 775 | const char *variant; | ^~~~~~~ drivers/bluetooth/btqca.c: In function 'qca_get_alt_nvm_path.constprop': >> drivers/bluetooth/btqca.c:288:45: warning: '.bin' directive output may be truncated writing 4 bytes into a region of size between 1 and 64 [-Wformat-truncation=] 288 | snprintf(fwname, sizeof(fwname), "%s.bin", fwname); | ^~~~ drivers/bluetooth/btqca.c:288:9: note: 'snprintf' output between 5 and 68 bytes into a destination of size 64 288 | snprintf(fwname, sizeof(fwname), "%s.bin", fwname); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/bluetooth/btqca.c:288:9: warning: 'snprintf' argument 4 overlaps destination object 'fwname' [-Wrestrict] drivers/bluetooth/btqca.c:277:14: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 277 | char fwname[64]; | ^~~~~~ vim +/variant +775 drivers/bluetooth/btqca.c 770 771 static void qca_get_nvm_name_by_board(char *fwname, size_t max_size, 772 const char *firmware_name, struct qca_btsoc_version ver, 773 enum qca_btsoc_type soc_type, u16 bid) 774 { > 775 const char *variant; 776 777 /* Set the variant to empty by default */ 778 variant = ""; 779 /* hsp gf chip */ 780 if (soc_type == QCA_WCN6855) { 781 if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID) 782 variant = "g"; 783 } 784 785 if (bid == 0x0) 786 snprintf(fwname, max_size, "qca/%s.bin", firmware_name); 787 else if (bid & 0xff00) 788 snprintf(fwname, max_size, "qca/%s.b%x", firmware_name, bid); 789 else 790 snprintf(fwname, max_size, "qca/%s.b%02x", firmware_name, bid); 791 } 792 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki