diff mbox series

[v4,1/2] Bluetooth: btintel: Define macros for image types

Message ID 20240311045214.350475-1-kiran.k@intel.com (mailing list archive)
State Superseded
Headers show
Series [v4,1/2] Bluetooth: btintel: Define macros for image types | 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 fail BuildKernel: FAIL: drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’: drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’? 2209 | if (ver->img_type == IMG_BOOTLOADER) | ^~~~~~~~~~~~~~ | INTEL_BOOTLOADER drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1 make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:481: drivers] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2
tedd_an/CheckAllWarning fail CheckAllWarning: FAIL: drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’: drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’? 2209 | if (ver->img_type == IMG_BOOTLOADER) | ^~~~~~~~~~~~~~ | INTEL_BOOTLOADER drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1 make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:481: drivers] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2
tedd_an/CheckSparse fail CheckSparse: FAIL: net/bluetooth/af_bluetooth.c:223:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2682:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2768:43: warning: array of flexible structures drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’: drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’? 2209 | if (ver->img_type == IMG_BOOTLOADER) | ^~~~~~~~~~~~~~ | INTEL_BOOTLOADER drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1 make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:481: drivers] Error 2 make[2]: *** Waiting for unfinished jobs.... net/bluetooth/hci_codec.c: note: in included file: ./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures net/bluetooth/sco.c: note: in included file: ./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2
tedd_an/CheckSmatch fail CheckSparse: FAIL: net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h): ./include/net/bluetooth/hci.h:2682:47: warning: array of flexible structures ./include/net/bluetooth/hci.h:2768:43: warning: array of flexible structures drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’: drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’? 2209 | if (ver->img_type == IMG_BOOTLOADER) | ^~~~~~~~~~~~~~ | INTEL_BOOTLOADER drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1 make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:481: drivers] Error 2 make[2]: *** Waiting for unfinished jobs.... net/bluetooth/hci_codec.c: note: in included file: ./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures net/bluetooth/sco.c: note: in included file: ./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2
tedd_an/BuildKernel32 fail BuildKernel32: FAIL: drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’: drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’? 2209 | if (ver->img_type == IMG_BOOTLOADER) | ^~~~~~~~~~~~~~ | INTEL_BOOTLOADER drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1 make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:481: drivers] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2 make: *** [Makefile:240: __sub-make] Error 2
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

K, Kiran March 11, 2024, 4:52 a.m. UTC
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(-)

Comments

bluez.test.bot@gmail.com March 11, 2024, 5:32 a.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=834186

---Test result---

Test Summary:
CheckPatch                    FAIL      1.79 seconds
GitLint                       FAIL      0.74 seconds
SubjectPrefix                 PASS      0.18 seconds
BuildKernel                   FAIL      24.48 seconds
CheckAllWarning               FAIL      27.24 seconds
CheckSparse                   FAIL      31.39 seconds
CheckSmatch                   FAIL      87.49 seconds
BuildKernel32                 FAIL      23.98 seconds
TestRunnerSetup               PASS      507.39 seconds
TestRunner_l2cap-tester       PASS      20.05 seconds
TestRunner_iso-tester         PASS      29.93 seconds
TestRunner_bnep-tester        PASS      4.80 seconds
TestRunner_mgmt-tester        PASS      112.20 seconds
TestRunner_rfcomm-tester      PASS      7.29 seconds
TestRunner_sco-tester         PASS      14.95 seconds
TestRunner_ioctl-tester       PASS      7.81 seconds
TestRunner_mesh-tester        PASS      5.88 seconds
TestRunner_smp-tester         PASS      6.85 seconds
TestRunner_userchan-tester    PASS      4.98 seconds
IncrementalBuild              FAIL      32.25 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v4,2/2] Bluetooth: btintel: Add support to download 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/13588290.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:
[v4,2/2] Bluetooth: btintel: Add support to download 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"
##############################
Test: BuildKernel - FAIL
Desc: Build Kernel for Bluetooth
Output:

drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: CheckAllWarning - FAIL
Desc: Run linux kernel with all warning enabled
Output:

drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: CheckSparse - FAIL
Desc: Run sparse tool with linux kernel
Output:

net/bluetooth/af_bluetooth.c:223:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block
drivers/bluetooth/hci_ag6xx.c:257:24: warning: restricted __le32 degrades to integer
drivers/bluetooth/hci_mrvl.c:170:23: warning: restricted __le16 degrades to integer
drivers/bluetooth/hci_mrvl.c:203:23: warning: restricted __le16 degrades to integer
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2682:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2768:43: warning: array of flexible structures
drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
net/bluetooth/sco.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:2682:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:2768:43: warning: array of flexible structures
drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
net/bluetooth/sco.c: note: in included file:
./include/net/bluetooth/hci_core.h:150:35: warning: array of flexible structures
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: BuildKernel32 - FAIL
Desc: Build 32bit Kernel for Bluetooth
Output:

drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:
[v4,2/2] Bluetooth: btintel: Add support to download intermediate loader

drivers/bluetooth/btintel.c: In function ‘btintel_get_fw_name_tlv’:
drivers/bluetooth/btintel.c:2209:24: error: ‘IMG_BOOTLOADER’ undeclared (first use in this function); did you mean ‘INTEL_BOOTLOADER’?
 2209 |   if (ver->img_type == IMG_BOOTLOADER)
      |                        ^~~~~~~~~~~~~~
      |                        INTEL_BOOTLOADER
drivers/bluetooth/btintel.c:2209:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:243: drivers/bluetooth/btintel.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:481: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 6ba7f5d1b837..2abe75f06e9c 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 BTINTEL_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 BTINTEL_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 == BTINTEL_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 == BTINTEL_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 == BTINTEL_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 == BTINTEL_IMG_OP)
 		goto finish;
 
 	err = btintel_boot(hdev, boot_param);
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index d19fcdb9ff0b..d961a33bfbd6 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -51,6 +51,9 @@  struct intel_tlv {
 	u8 val[];
 } __packed;
 
+#define BTINTEL_IMG_BOOTLOADER		0x01	/* Bootloader image */
+#define BTINTEL_IMG_OP			0x03	/* Operational image */
+
 struct intel_version_tlv {
 	u32	cnvi_top;
 	u32	cnvr_top;