Skip to contentSkip to conversation

emulator: Fix compilation on big endian systems

PATCH Applied Bastien Nocera 3 participants 3 messages Feb 10 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 emulator: Fix compilation on big endian systems

This fixes the build on big endian systems like s390x:

Remove the "static" so the array doesn't need to be initialised with constants.

emulator/bthost.c: In function ‘bthost_setup_sco’:
./src/shared/util.h:43:26: error: initializer element is not constant
43 | #define cpu_to_le32(val) bswap_32(val)

      |                          ^~~~~~~~

etc.

Fixes 85888a8357ea ("bthost: add bthost_setup_sco() and accept

incoming eSCO")

---
 emulator/bthost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
emulator/bthost.c +1 -1
index d09ad1e76c50..53b12f828675 100644
@@ -3560,7 +3560,7 @@ void bthost_hci_disconnect(struct bthost *bthost, uint16_t handle,
 int bthost_setup_sco(struct bthost *bthost, uint16_t acl_handle,
 							uint16_t setting)
 {
-	static const struct bt_hci_cmd_setup_sync_conn settings[] = {
+	const struct bt_hci_cmd_setup_sync_conn settings[] = {
 		{
 			.tx_bandwidth = cpu_to_le32(0x00001f40),
 			.rx_bandwidth = cpu_to_le32(0x00001f40),
Signature · 1 line
2.52.0
#1 lore raw

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=1052631

---Test result---

Test Summary:

CheckPatch                    PENDING   0.51 seconds
GitLint                       PENDING   0.54 seconds
BuildEll                      PASS      20.30 seconds
BluezMake                     PASS      658.81 seconds
MakeCheck                     PASS      18.54 seconds
MakeDistcheck                 PASS      251.17 seconds
CheckValgrind                 PASS      300.09 seconds
CheckSmatch                   WARNING   359.76 seconds
bluezmakeextell               PASS      187.40 seconds
IncrementalBuild              PENDING   0.45 seconds
ScanBuild                     PASS      1061.52 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/bthost.c:700:28: warning: Variable length array is used.emulator/bthost.c:701:32: warning: Variable length array is used.emulator/bthost.c:918:28: warning: Variable length array is used.emulator/bthost.c:952:28: warning: Variable length array is used.emulator/bthost.c:953:32: warning: Variable length array is used.
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Bastien Nocera
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 5 lines · On Tue, 10 Feb 2026 10:32:47 +0100 you wrote:

This fixes the build on big endian systems like s390x:

Remove the "static" so the array doesn't need to be initialised with constants.

Quoted 7 lines

emulator/bthost.c: In function ‘bthost_setup_sco’:
./src/shared/util.h:43:26: error: initializer element is not constant
43 | #define cpu_to_le32(val) bswap_32(val)

      |                          ^~~~~~~~

etc.

[...]

Here is the summary with links:
- [BlueZ,v2] emulator: Fix compilation on big endian systems
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f1eedda9cefc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html