[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202511201312.njyFmd0I-lkp@intel.com>
Date: Thu, 20 Nov 2025 15:12:36 +0800
From: kernel test robot <lkp@...el.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>, marcel@...tmann.org,
luiz.dentz@...il.com
Cc: oe-kbuild-all@...ts.linux.dev, linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org, amitkumar.karwar@....com,
sherry.sun@....com, dmitrii.lebed@....com,
neeraj.sanjaykale@....com
Subject: Re: [PATCH v1 01/11] Bluetooth: btnxpuart: Add firmware metadata
parsing for secure interface
Hi Neeraj,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master linus/master v6.18-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Neeraj-Sanjay-Kale/Bluetooth-btnxpuart-Add-firmware-metadata-parsing-for-secure-interface/20251118-223605
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20251118142025.1982263-2-neeraj.sanjaykale%40nxp.com
patch subject: [PATCH v1 01/11] Bluetooth: btnxpuart: Add firmware metadata parsing for secure interface
config: i386-randconfig-061-20251120 (https://download.01.org/0day-ci/archive/20251120/202511201312.njyFmd0I-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251120/202511201312.njyFmd0I-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511201312.njyFmd0I-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btnxpuart.c:1284:55: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:1292:27: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:1297:47: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:1298:32: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:1301:26: sparse: sparse: restricted __le32 degrades to integer
drivers/bluetooth/btnxpuart.c:1380:17: sparse: sparse: restricted __le32 degrades to integer
vim +1284 drivers/bluetooth/btnxpuart.c
1261
1262 static void nxp_process_fw_meta_data(struct hci_dev *hdev, const struct firmware *fw)
1263 {
1264 const char *metamagc = "metamagc";
1265 struct fw_metadata_hdr *hdr = NULL;
1266 struct fw_metadata_tail *tail;
1267 u32 hdr_crc = 0;
1268 u32 payload_crc = 0;
1269 char *payload;
1270 u32 payload_len = 0;
1271
1272 /* FW metadata should contain at least header and tail */
1273 if (fw->size < (sizeof(*hdr) + sizeof(*tail)))
1274 return;
1275
1276 tail = (struct fw_metadata_tail *)&fw->data[fw->size - sizeof(*tail)];
1277
1278 /* If tail doesn't contain the string "metamagc", this is invalid FW metadata */
1279 if (memcmp(metamagc, tail->magic, strlen(metamagc)))
1280 return;
1281
1282 hdr = (struct fw_metadata_hdr *)&fw->data[fw->size -
1283 sizeof(*tail) -
> 1284 tail->len];
1285
1286 /* If metadata header isn't cmd24, this is invalid FW metadata */
1287 if (le32_to_cpu(hdr->cmd) != 24)
1288 return;
1289
1290 /* If header CRC doesn't match, this is invalid FW metadata */
1291 hdr_crc = crc32_be(0, (u8 *)hdr, offsetof(struct fw_metadata_hdr, crc));
1292 if (hdr_crc != hdr->crc)
1293 return;
1294
1295 /* If payload CRC doesn't match, this is invalid FW metadata */
1296 payload = (u8 *)hdr + sizeof(*hdr);
1297 payload_crc = crc32_be(0, payload, hdr->len - 4);
1298 if (payload_crc != tail->crc)
1299 return;
1300
1301 payload_len = hdr->len - sizeof(*tail);
1302
1303 while (payload_len > sizeof(struct fw_metadata_tlv))
1304 payload_len -= nxp_process_fw_metadata_tlv(hdev, &payload);
1305 }
1306
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists