linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v2] shared/bap: make BT_BAP_* direction defines valid bitmasks
@ 2024-06-17 16:59 Pauli Virtanen
  2024-06-17 18:41 ` [BlueZ,v2] " bluez.test.bot
  2024-06-17 19:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2024-06-17 16:59 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

The directions appear to be intended as bitmasks, as
bt_bap_stream_io_dir() will bitwise or linked stream directions.

Fix the defines to be separate bits.

Fixes confusion due to BT_BAP_BCAST_SOURCE == BT_BAP_SINK|BT_BAP_SOURCE,
which causes e.g. unicast transports to be in PENDING state after QoS
although this does not make sense for BAP unicast Client.
---

Notes:
    v2: use BIT macro

 src/shared/bap-defs.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/shared/bap-defs.h b/src/shared/bap-defs.h
index 2467e816f..27fefa34f 100644
--- a/src/shared/bap-defs.h
+++ b/src/shared/bap-defs.h
@@ -15,10 +15,10 @@
 #define __packed __attribute__((packed))
 #endif
 
-#define BT_BAP_SINK			0x01
-#define	BT_BAP_SOURCE			0x02
-#define	BT_BAP_BCAST_SOURCE		0x03
-#define	BT_BAP_BCAST_SINK		0x04
+#define BT_BAP_SINK			BIT(0)
+#define	BT_BAP_SOURCE			BIT(1)
+#define	BT_BAP_BCAST_SOURCE		BIT(2)
+#define	BT_BAP_BCAST_SINK		BIT(3)
 
 #define BT_BAP_STREAM_TYPE_UCAST	0x01
 #define	BT_BAP_STREAM_TYPE_BCAST	0x02
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v2] shared/bap: make BT_BAP_* direction defines valid bitmasks
  2024-06-17 16:59 [PATCH BlueZ v2] shared/bap: make BT_BAP_* direction defines valid bitmasks Pauli Virtanen
@ 2024-06-17 18:41 ` bluez.test.bot
  2024-06-17 19:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-06-17 18:41 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.28 seconds
GitLint                       PASS      0.21 seconds
BuildEll                      PASS      25.54 seconds
BluezMake                     PASS      1745.05 seconds
MakeCheck                     PASS      13.08 seconds
MakeDistcheck                 PASS      180.54 seconds
CheckValgrind                 PASS      254.51 seconds
CheckSmatch                   PASS      354.05 seconds
bluezmakeextell               PASS      120.31 seconds
IncrementalBuild              PASS      1474.31 seconds
ScanBuild                     PASS      1047.81 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v2] shared/bap: make BT_BAP_* direction defines valid bitmasks
  2024-06-17 16:59 [PATCH BlueZ v2] shared/bap: make BT_BAP_* direction defines valid bitmasks Pauli Virtanen
  2024-06-17 18:41 ` [BlueZ,v2] " bluez.test.bot
@ 2024-06-17 19:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-17 19:10 UTC (permalink / raw)
  To: Pauli Virtanen; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 17 Jun 2024 19:59:40 +0300 you wrote:
> The directions appear to be intended as bitmasks, as
> bt_bap_stream_io_dir() will bitwise or linked stream directions.
> 
> Fix the defines to be separate bits.
> 
> Fixes confusion due to BT_BAP_BCAST_SOURCE == BT_BAP_SINK|BT_BAP_SOURCE,
> which causes e.g. unicast transports to be in PENDING state after QoS
> although this does not make sense for BAP unicast Client.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2] shared/bap: make BT_BAP_* direction defines valid bitmasks
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=52bda9d45572

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-17 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 16:59 [PATCH BlueZ v2] shared/bap: make BT_BAP_* direction defines valid bitmasks Pauli Virtanen
2024-06-17 18:41 ` [BlueZ,v2] " bluez.test.bot
2024-06-17 19:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).