Thread (4 messages) 4 messages, 2 authors, 7d ago

Re: [PATCH v3] Bluetooth: Add Broadcom channel priority commands

From: Sasha Finkelstein <k@chaosmail.tech>
Date: 2026-05-25 14:05:19
Also in: asahi, linux-arm-kernel, linux-bluetooth, lkml

On May 25, 2026, at 15:58, Joshua Peisach [off-list ref] wrote:

On Mon May 25, 2026 at 8:11 AM EDT, Sasha Finkelstein wrote:
quoted
+ cmd.enable = !!enable;
+
Probably a dumb question, but worth asking - what is the purpose of the
"!!"? Wouldn't just passing "enable" be sufficient?
This is a way to enforce that the value is exactly 0 or 1, not 0 or non-zero.
Also, currently, cmd.enable seems to just be set and used in the case
of boolean conditions. Would it make sense for the enable field in
brcm_prio_cmd to be a bool or does it not really matter?
Opposite, actually, this struct is fed to firmware, and it needs to be
specifically a u8.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help