diff mbox series

[BlueZ] device: Clear only the pending flags that have been applied

Message ID 20250129172231.329172-1-ludovico.denittis@collabora.com (mailing list archive)
State Accepted
Commit f0d0266acd9d0f91f8b68ebcbf9cf0e99f62956c
Headers show
Series [BlueZ] device: Clear only the pending flags that have been applied | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
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 success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Ludovico de Nittis Jan. 29, 2025, 5:22 p.m. UTC
When executing `btd_device_flags_changed()`, `dev->pending_flags` may
hold additional queued flag changes.

Instead of completely clearing out `dev->pending_flags`, we should only
remove the bits that have been actually applied and leaving the rest as
pending.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Jan. 29, 2025, 6:32 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=929127

---Test result---

Test Summary:
CheckPatch                    PENDING   0.21 seconds
GitLint                       PENDING   0.20 seconds
BuildEll                      PASS      20.84 seconds
BluezMake                     PASS      1535.06 seconds
MakeCheck                     PASS      12.86 seconds
MakeDistcheck                 PASS      159.47 seconds
CheckValgrind                 PASS      215.01 seconds
CheckSmatch                   PASS      272.19 seconds
bluezmakeextell               PASS      98.41 seconds
IncrementalBuild              PENDING   0.30 seconds
ScanBuild                     PASS      899.80 seconds

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

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

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Jan. 30, 2025, 5:30 p.m. UTC | #2
Hello:

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

On Wed, 29 Jan 2025 18:22:31 +0100 you wrote:
> When executing `btd_device_flags_changed()`, `dev->pending_flags` may
> hold additional queued flag changes.
> 
> Instead of completely clearing out `dev->pending_flags`, we should only
> remove the bits that have been actually applied and leaving the rest as
> pending.
> 
> [...]

Here is the summary with links:
  - [BlueZ] device: Clear only the pending flags that have been applied
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f0d0266acd9d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index e8bff718c..17d023a61 100644
--- a/src/device.c
+++ b/src/device.c
@@ -7413,7 +7413,7 @@  void btd_device_flags_changed(struct btd_device *dev, uint32_t supported_flags,
 
 	dev->supported_flags = supported_flags;
 	dev->current_flags = current_flags;
-	dev->pending_flags = 0;
+	dev->pending_flags &= ~current_flags;
 
 	if (!changed_flags)
 		return;