From 8c947cd1c27d6493ed7e6630e168222454f53edb Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 25 Aug 2026 11:36:33 +0800 Subject: [PATCH] Bluetooth: btmtksdio: Remove redundant firmware filename override btmtksdio_setup() derives the firmware filename with btmtk_fw_get_filename() and then overwrites it with an snprintf() that open-codes that helper's fallback format. Commit 7f935b21bee4 ("Bluetooth: btmtk: apply the common btmtk_fw_get_filename") added the helper call without removing the snprintf() it was meant to replace. None of the device ids the helper special-cases can appear here: 0x6639, 0x7925 and the flavored 0x7961 belong to parts with no SDIO interface, and btmtksdio_setup() passes a flavor of 0 accordingly. The helper always falls through to the snprintf()'s own format, so both produce the same string and removing it is a no-op. Remove it anyway, since it silently defeats the helper for any device id the helper special-cases. Signed-off-by: Chris Lu Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz --- drivers/bluetooth/btmtksdio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index f606174c606a..aaaa2a81ce96 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -1180,9 +1180,6 @@ static int btmtksdio_setup(struct hci_dev *hdev) btmtk_fw_get_filename(fwname, sizeof(fwname), dev_id, fw_version, 0); - snprintf(fwname, sizeof(fwname), - "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin", - dev_id & 0xffff, (fw_version & 0xff) + 1); err = mt79xx_setup(hdev, fwname); if (err < 0) return err;