diff mbox series

[BlueZ] shared/bap: ucast streams can only have one link

Message ID b0eeb28d794adca98f4a246cb368e68022e06e0e.1729937570.git.pav@iki.fi (mailing list archive)
State New
Headers show
Series [BlueZ] shared/bap: ucast streams can only have one link | 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/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch warning CheckSparse WARNING src/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Pauli Virtanen Oct. 26, 2024, 10:13 a.m. UTC
In unicast, linked streams mean bidirectional CIS.  Ucast stream can
have at most one linked stream.

Fix ucast streams to have only single link. This fixes eg. configuring
for AC 11(i).
---
 src/shared/bap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Oct. 26, 2024, 12:05 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=903408

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      24.63 seconds
BluezMake                     PASS      1662.11 seconds
MakeCheck                     PASS      12.86 seconds
MakeDistcheck                 PASS      178.70 seconds
CheckValgrind                 PASS      252.74 seconds
CheckSmatch                   WARNING   357.13 seconds
bluezmakeextell               PASS      120.59 seconds
IncrementalBuild              PASS      1412.18 seconds
ScanBuild                     PASS      1004.74 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:296:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index dad510aec..658ee1370 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2422,8 +2422,7 @@  static int bap_ucast_io_link(struct bt_bap_stream *stream,
 
 	bap = stream->bap;
 
-	if (queue_find(stream->links, NULL, link) ||
-		queue_find(link->links, NULL, stream))
+	if (!queue_isempty(stream->links) || !queue_isempty(link->links))
 		return -EALREADY;
 
 	if (stream->client != link->client ||