OSDN Git Service

Bluetooth: btqca: use le32_to_cpu for ver.soc_id
authorMin-Hua Chen <minhuadotchen@gmail.com>
Fri, 19 May 2023 10:43:23 +0000 (18:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Jun 2023 17:48:35 +0000 (10:48 -0700)
Use le32_to_cpu for ver.soc_id to fix the following
sparse warning.

drivers/bluetooth/btqca.c:640:24: sparse: warning: restricted
__le32 degrades to integer

Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/bluetooth/btqca.c

index fd0941f..e7e58a9 100644 (file)
@@ -637,7 +637,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
                snprintf(config.fwname, sizeof(config.fwname),
                         "qca/%s", firmware_name);
        else if (qca_is_wcn399x(soc_type)) {
-               if (ver.soc_id == QCA_WCN3991_SOC_ID) {
+               if (le32_to_cpu(ver.soc_id) == QCA_WCN3991_SOC_ID) {
                        snprintf(config.fwname, sizeof(config.fwname),
                                 "qca/crnv%02xu.bin", rom_ver);
                } else {