Message ID | 20240305144459.119564-1-kiran.k@intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v3,1/2] Bluetooth: btintel: Define macros for image types | expand |
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 | CheckAllWarning 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 |
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=832561 ---Test result--- Test Summary: CheckPatch FAIL 1.91 seconds GitLint FAIL 0.85 seconds SubjectPrefix PASS 0.23 seconds BuildKernel PASS 27.66 seconds CheckAllWarning PASS 30.39 seconds CheckSparse PASS 35.88 seconds CheckSmatch PASS 98.13 seconds BuildKernel32 PASS 26.83 seconds TestRunnerSetup PASS 495.42 seconds TestRunner_l2cap-tester PASS 19.98 seconds TestRunner_iso-tester PASS 30.26 seconds TestRunner_bnep-tester PASS 4.80 seconds TestRunner_mgmt-tester PASS 113.15 seconds TestRunner_rfcomm-tester PASS 7.34 seconds TestRunner_sco-tester PASS 14.98 seconds TestRunner_ioctl-tester PASS 7.76 seconds TestRunner_mesh-tester PASS 5.85 seconds TestRunner_smp-tester PASS 6.84 seconds TestRunner_userchan-tester PASS 4.95 seconds IncrementalBuild PASS 32.14 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: [v3,2/2] Bluetooth: btintel: Add support for downloading intermediate loader WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #80: Intermediate bootloader (IML) image. IML gives flexibility to fix issues as its total: 0 errors, 1 warnings, 69 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13582504.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ############################## Test: GitLint - FAIL Desc: Run gitlint Output: [v3,2/2] Bluetooth: btintel: Add support for downloading intermediate loader WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 24: B1 Line exceeds max length (81>80): "[13.458075] Bluetooth: hci0: Bootloader timestamp 2022.46 buildtype 1 build 26590" --- Regards, Linux Bluetooth
Hi Kiran, On Tue, Mar 5, 2024 at 9:38 AM Kiran K <kiran.k@intel.com> wrote: > > Use macro for image type instead of using hard code number. > > Signed-off-by: Kiran K <kiran.k@intel.com> > --- > drivers/bluetooth/btintel.c | 12 ++++++------ > drivers/bluetooth/btintel.h | 3 +++ > 2 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > index 6ba7f5d1b837..ed98bb867cff 100644 > --- a/drivers/bluetooth/btintel.c > +++ b/drivers/bluetooth/btintel.c > @@ -489,7 +489,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, > } > > switch (version->img_type) { > - case 0x01: > + case IMG_BOOTLOADER: > variant = "Bootloader"; > /* It is required that every single firmware fragment is acknowledged > * with a command complete event. If the boot parameters indicate > @@ -521,7 +521,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, > version->min_fw_build_nn, version->min_fw_build_cw, > 2000 + version->min_fw_build_yy); > break; > - case 0x03: > + case IMG_OP: > variant = "Firmware"; > break; > default: > @@ -535,7 +535,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, > bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u", variant, > 2000 + (version->timestamp >> 8), version->timestamp & 0xff, > version->build_type, version->build_num); > - if (version->img_type == 0x03) > + if (version->img_type == IMG_OP) > bt_dev_info(hdev, "Firmware SHA1: 0x%8.8x", version->git_sha1); > > return 0; > @@ -1172,7 +1172,7 @@ static int btintel_download_fw_tlv(struct hci_dev *hdev, > * If the firmware version has changed that means it needs to be reset > * to bootloader when operational so the new firmware can be loaded. > */ > - if (ver->img_type == 0x03) > + if (ver->img_type == IMG_OP) > return -EINVAL; > > /* iBT hardware variants 0x0b, 0x0c, 0x11, 0x12, 0x13, 0x14 support > @@ -2230,7 +2230,7 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, > * It is not possible to use the Secure Boot Parameters in this > * case since that command is only available in bootloader mode. > */ > - if (ver->img_type == 0x03) { > + if (ver->img_type == IMG_OP) { > btintel_clear_flag(hdev, INTEL_BOOTLOADER); > btintel_check_bdaddr(hdev); > } else { > @@ -2600,7 +2600,7 @@ static int btintel_bootloader_setup_tlv(struct hci_dev *hdev, > return err; > > /* check if controller is already having an operational firmware */ > - if (ver->img_type == 0x03) > + if (ver->img_type == IMG_OP) > goto finish; > > err = btintel_boot(hdev, boot_param); > diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h > index d19fcdb9ff0b..52b2f1986f85 100644 > --- a/drivers/bluetooth/btintel.h > +++ b/drivers/bluetooth/btintel.h > @@ -51,6 +51,9 @@ struct intel_tlv { > u8 val[]; > } __packed; > > +#define IMG_BOOTLOADER 0x01 /* Bootloader image */ > +#define IMG_OP 0x03 /* Operational image */ Lets prefix these with BTINTEL. > struct intel_version_tlv { > u32 cnvi_top; > u32 cnvr_top; > -- > 2.34.1 > >
Hi Luiz, > -----Original Message----- > From: Luiz Augusto von Dentz <luiz.dentz@gmail.com> > Sent: Wednesday, March 6, 2024 4:13 AM > To: K, Kiran <kiran.k@intel.com> > Cc: linux-bluetooth@vger.kernel.org; Srivatsa, Ravishankar > <ravishankar.srivatsa@intel.com>; Tumkur Narayan, Chethan > <chethan.tumkur.narayan@intel.com> > Subject: Re: [PATCH v3 1/2] Bluetooth: btintel: Define macros for image types > > Hi Kiran, > > On Tue, Mar 5, 2024 at 9:38 AM Kiran K <kiran.k@intel.com> wrote: > > > > Use macro for image type instead of using hard code number. > > > > Signed-off-by: Kiran K <kiran.k@intel.com> > > --- > > drivers/bluetooth/btintel.c | 12 ++++++------ > > drivers/bluetooth/btintel.h | 3 +++ > > 2 files changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > > index 6ba7f5d1b837..ed98bb867cff 100644 > > --- a/drivers/bluetooth/btintel.c > > +++ b/drivers/bluetooth/btintel.c > > @@ -489,7 +489,7 @@ static int btintel_version_info_tlv(struct hci_dev > *hdev, > > } > > > > switch (version->img_type) { > > - case 0x01: > > + case IMG_BOOTLOADER: > > variant = "Bootloader"; > > /* It is required that every single firmware fragment is > acknowledged > > * with a command complete event. If the boot > > parameters indicate @@ -521,7 +521,7 @@ static int > btintel_version_info_tlv(struct hci_dev *hdev, > > version->min_fw_build_nn, version->min_fw_build_cw, > > 2000 + version->min_fw_build_yy); > > break; > > - case 0x03: > > + case IMG_OP: > > variant = "Firmware"; > > break; > > default: > > @@ -535,7 +535,7 @@ static int btintel_version_info_tlv(struct hci_dev > *hdev, > > bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u", > variant, > > 2000 + (version->timestamp >> 8), version->timestamp & 0xff, > > version->build_type, version->build_num); > > - if (version->img_type == 0x03) > > + if (version->img_type == IMG_OP) > > bt_dev_info(hdev, "Firmware SHA1: 0x%8.8x", > > version->git_sha1); > > > > return 0; > > @@ -1172,7 +1172,7 @@ static int btintel_download_fw_tlv(struct hci_dev > *hdev, > > * If the firmware version has changed that means it needs to be reset > > * to bootloader when operational so the new firmware can be loaded. > > */ > > - if (ver->img_type == 0x03) > > + if (ver->img_type == IMG_OP) > > return -EINVAL; > > > > /* iBT hardware variants 0x0b, 0x0c, 0x11, 0x12, 0x13, 0x14 > > support @@ -2230,7 +2230,7 @@ static int > btintel_prepare_fw_download_tlv(struct hci_dev *hdev, > > * It is not possible to use the Secure Boot Parameters in this > > * case since that command is only available in bootloader mode. > > */ > > - if (ver->img_type == 0x03) { > > + if (ver->img_type == IMG_OP) { > > btintel_clear_flag(hdev, INTEL_BOOTLOADER); > > btintel_check_bdaddr(hdev); > > } else { > > @@ -2600,7 +2600,7 @@ static int btintel_bootloader_setup_tlv(struct > hci_dev *hdev, > > return err; > > > > /* check if controller is already having an operational firmware */ > > - if (ver->img_type == 0x03) > > + if (ver->img_type == IMG_OP) > > goto finish; > > > > err = btintel_boot(hdev, boot_param); diff --git > > a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index > > d19fcdb9ff0b..52b2f1986f85 100644 > > --- a/drivers/bluetooth/btintel.h > > +++ b/drivers/bluetooth/btintel.h > > @@ -51,6 +51,9 @@ struct intel_tlv { > > u8 val[]; > > } __packed; > > > > +#define IMG_BOOTLOADER 0x01 /* Bootloader image */ > > +#define IMG_OP 0x03 /* Operational image */ > > Lets prefix these with BTINTEL. Ack. > > > struct intel_version_tlv { > > u32 cnvi_top; > > u32 cnvr_top; > > -- > > 2.34.1 > > > > > > > -- > Luiz Augusto von Dentz Thanks, Kiran
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 6ba7f5d1b837..ed98bb867cff 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -489,7 +489,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, } switch (version->img_type) { - case 0x01: + case IMG_BOOTLOADER: variant = "Bootloader"; /* It is required that every single firmware fragment is acknowledged * with a command complete event. If the boot parameters indicate @@ -521,7 +521,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, version->min_fw_build_nn, version->min_fw_build_cw, 2000 + version->min_fw_build_yy); break; - case 0x03: + case IMG_OP: variant = "Firmware"; break; default: @@ -535,7 +535,7 @@ static int btintel_version_info_tlv(struct hci_dev *hdev, bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u", variant, 2000 + (version->timestamp >> 8), version->timestamp & 0xff, version->build_type, version->build_num); - if (version->img_type == 0x03) + if (version->img_type == IMG_OP) bt_dev_info(hdev, "Firmware SHA1: 0x%8.8x", version->git_sha1); return 0; @@ -1172,7 +1172,7 @@ static int btintel_download_fw_tlv(struct hci_dev *hdev, * If the firmware version has changed that means it needs to be reset * to bootloader when operational so the new firmware can be loaded. */ - if (ver->img_type == 0x03) + if (ver->img_type == IMG_OP) return -EINVAL; /* iBT hardware variants 0x0b, 0x0c, 0x11, 0x12, 0x13, 0x14 support @@ -2230,7 +2230,7 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev, * It is not possible to use the Secure Boot Parameters in this * case since that command is only available in bootloader mode. */ - if (ver->img_type == 0x03) { + if (ver->img_type == IMG_OP) { btintel_clear_flag(hdev, INTEL_BOOTLOADER); btintel_check_bdaddr(hdev); } else { @@ -2600,7 +2600,7 @@ static int btintel_bootloader_setup_tlv(struct hci_dev *hdev, return err; /* check if controller is already having an operational firmware */ - if (ver->img_type == 0x03) + if (ver->img_type == IMG_OP) goto finish; err = btintel_boot(hdev, boot_param); diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index d19fcdb9ff0b..52b2f1986f85 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -51,6 +51,9 @@ struct intel_tlv { u8 val[]; } __packed; +#define IMG_BOOTLOADER 0x01 /* Bootloader image */ +#define IMG_OP 0x03 /* Operational image */ + struct intel_version_tlv { u32 cnvi_top; u32 cnvr_top;
Use macro for image type instead of using hard code number. Signed-off-by: Kiran K <kiran.k@intel.com> --- drivers/bluetooth/btintel.c | 12 ++++++------ drivers/bluetooth/btintel.h | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-)