* [PATCH] Bluetooth: btmtk: use bool for first_block
@ 2026-07-10 5:17 Miles Krause via B4 Relay
2026-07-10 7:54 ` bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Miles Krause via B4 Relay @ 2026-07-10 5:17 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
Matthias Brugger
Cc: linux-bluetooth, linux-arm-kernel, linux-mediatek, linux-kernel,
Miles Krause
From: Miles Krause <mileskrause5200@gmail.com>
first_block is reset for each firmware section and is never used outside
the section loop. Declare it as a bool inside the loop to limit its scope
and make its two-state purpose explicit.
No functional change.
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
---
Compile-tested on x86_64 with:
make O=out allmodconfig
make O=out W=1 drivers/bluetooth/btmtk.o
Sparse-tested with:
make O=out-sparse allmodconfig
make O=out-sparse C=1 CHECK=sparse drivers/bluetooth/btmtk.o
---
drivers/bluetooth/btmtk.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index 809762d64fc6..b809eb82fc73 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -63,7 +63,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
const u8 *fw_ptr;
const u8 *fw_bin_ptr;
int err, dlen, i, status;
- u8 flag, first_block, retry;
+ u8 flag, retry;
u32 section_num, dl_size, section_offset;
u8 cmd[64];
@@ -79,7 +79,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
section_num = le32_to_cpu(globaldesc->section_num);
for (i = 0; i < section_num; i++) {
- first_block = 1;
+ bool first_block = true;
fw_ptr = fw_bin_ptr;
sectionmap = (struct btmtk_section_map *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE +
MTK_FW_ROM_PATCH_GD_SIZE + MTK_FW_ROM_PATCH_SEC_MAP_SIZE * i);
@@ -132,9 +132,9 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
while (dl_size > 0) {
dlen = min_t(int, 250, dl_size);
- if (first_block == 1) {
+ if (first_block) {
flag = 1;
- first_block = 0;
+ first_block = false;
} else if (dl_size - dlen <= 0) {
flag = 3;
} else {
---
base-commit: 64b5c4c8e79c131fe8f135bab5e5dfaa245c5776
change-id: 20260710-btmtk-first-block-bool-bd047b970821
Best regards,
--
Miles Krause <mileskrause5200@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: Bluetooth: btmtk: use bool for first_block
2026-07-10 5:17 [PATCH] Bluetooth: btmtk: use bool for first_block Miles Krause via B4 Relay
@ 2026-07-10 7:54 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-07-10 7:54 UTC (permalink / raw)
To: linux-bluetooth, mileskrause5200
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: drivers/bluetooth/btmtk.c:79
error: drivers/bluetooth/btmtk.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-10 7:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 5:17 [PATCH] Bluetooth: btmtk: use bool for first_block Miles Krause via B4 Relay
2026-07-10 7:54 ` bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox