diff mbox series

Bluetooth: btrtl: reuse define enumeration values

Message ID 20230914204404.1253141-1-andrej.skvortzov@gmail.com (mailing list archive)
State New, archived
Headers show
Series Bluetooth: btrtl: reuse define enumeration values | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckSparse PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Andrey Skvortsov Sept. 14, 2023, 8:44 p.m. UTC
rtlbt_parse_firmware function sets project_id defined like unnamed
integer constant. But later in the code (btrtl_set_quirks) project_id
is compared against values in btrtl_chip_id enumeration.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
 drivers/bluetooth/btrtl.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

Comments

bluez.test.bot@gmail.com Sept. 14, 2023, 9:43 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=784337

---Test result---

Test Summary:
CheckPatch                    PASS      0.71 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.08 seconds
BuildKernel                   PASS      46.04 seconds
CheckAllWarning               PASS      50.73 seconds
CheckSparse                   PASS      56.82 seconds
CheckSmatch                   PASS      152.69 seconds
BuildKernel32                 PASS      44.25 seconds
TestRunnerSetup               PASS      676.26 seconds
TestRunner_l2cap-tester       PASS      36.32 seconds
TestRunner_iso-tester         PASS      85.71 seconds
TestRunner_bnep-tester        PASS      13.89 seconds
TestRunner_mgmt-tester        PASS      275.52 seconds
TestRunner_rfcomm-tester      PASS      21.80 seconds
TestRunner_sco-tester         PASS      25.37 seconds
TestRunner_ioctl-tester       PASS      25.02 seconds
TestRunner_mesh-tester        PASS      18.35 seconds
TestRunner_smp-tester         PASS      19.78 seconds
TestRunner_userchan-tester    PASS      15.20 seconds
IncrementalBuild              PASS      41.39 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 84c2c2e1122f..018d86410b88 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -60,7 +60,8 @@  enum btrtl_chip_id {
 	CHIP_ID_8723B,
 	CHIP_ID_8821A,
 	CHIP_ID_8761A,
-	CHIP_ID_8822B = 8,
+	CHIP_ID_8703B = 7,
+	CHIP_ID_8822B,
 	CHIP_ID_8723D,
 	CHIP_ID_8821C,
 	CHIP_ID_8822C = 13,
@@ -631,20 +632,20 @@  static int rtlbt_parse_firmware(struct hci_dev *hdev,
 		__u16 lmp_subver;
 		__u8 id;
 	} project_id_to_lmp_subver[] = {
-		{ RTL_ROM_LMP_8723A, 0 },
-		{ RTL_ROM_LMP_8723B, 1 },
-		{ RTL_ROM_LMP_8821A, 2 },
-		{ RTL_ROM_LMP_8761A, 3 },
-		{ RTL_ROM_LMP_8703B, 7 },
-		{ RTL_ROM_LMP_8822B, 8 },
-		{ RTL_ROM_LMP_8723B, 9 },	/* 8723D */
-		{ RTL_ROM_LMP_8821A, 10 },	/* 8821C */
-		{ RTL_ROM_LMP_8822B, 13 },	/* 8822C */
-		{ RTL_ROM_LMP_8761A, 14 },	/* 8761B */
-		{ RTL_ROM_LMP_8852A, 18 },	/* 8852A */
-		{ RTL_ROM_LMP_8852A, 20 },	/* 8852B */
-		{ RTL_ROM_LMP_8852A, 25 },	/* 8852C */
-		{ RTL_ROM_LMP_8851B, 36 },	/* 8851B */
+		{ RTL_ROM_LMP_8723A, CHIP_ID_8723A },
+		{ RTL_ROM_LMP_8723B, CHIP_ID_8723B },
+		{ RTL_ROM_LMP_8821A, CHIP_ID_8821A },
+		{ RTL_ROM_LMP_8761A, CHIP_ID_8761A },
+		{ RTL_ROM_LMP_8703B, CHIP_ID_8703B },
+		{ RTL_ROM_LMP_8822B, CHIP_ID_8822B },
+		{ RTL_ROM_LMP_8723B, CHIP_ID_8723D },
+		{ RTL_ROM_LMP_8821A, CHIP_ID_8821C },
+		{ RTL_ROM_LMP_8822B, CHIP_ID_8822C },
+		{ RTL_ROM_LMP_8761A, CHIP_ID_8761B },
+		{ RTL_ROM_LMP_8852A, CHIP_ID_8852A },
+		{ RTL_ROM_LMP_8852A, CHIP_ID_8852B },
+		{ RTL_ROM_LMP_8852A, CHIP_ID_8852C },
+		{ RTL_ROM_LMP_8851B, CHIP_ID_8851B },
 	};
 
 	if (btrtl_dev->fw_len <= 8)