Skip to contentSkip to conversation

shared/bap: Fix overwriting sink attribute

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Aug 1, 2024 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 shared/bap: Fix overwriting sink attribute

From: Luiz Augusto von Dentz <[email protected]>

When allocating the sink and sink_ccc attribute they were being overwriten by source and source_ccc attributes.

---
 src/shared/bap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/shared/bap.c +2 -2
index 48fa74edca1c..8147e037b6b9 100644
@@ -559,14 +559,14 @@ static struct bt_pacs *pacs_new(struct gatt_db *db)
 					BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
 
 	bt_uuid16_create(&uuid, PAC_SOURCE_CHRC_UUID);
-	pacs->sink = gatt_db_service_add_characteristic(pacs->service, &uuid,
+	pacs->source = gatt_db_service_add_characteristic(pacs->service, &uuid,
 					BT_ATT_PERM_READ,
 					BT_GATT_CHRC_PROP_READ |
 					BT_GATT_CHRC_PROP_NOTIFY,
 					pacs_source_read, NULL,
 					pacs);
 
-	pacs->sink_ccc = gatt_db_service_add_ccc(pacs->service,
+	pacs->source_ccc = gatt_db_service_add_ccc(pacs->service,
 					BT_ATT_PERM_READ | BT_ATT_PERM_WRITE);
 
 	bt_uuid16_create(&uuid, PAC_SOURCE_LOC_CHRC_UUID);
Signature · 1 line
2.45.2
#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=875834

---Test result---

Test Summary:

CheckPatch                    FAIL      0.61 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      24.72 seconds
BluezMake                     PASS      1755.86 seconds
MakeCheck                     PASS      13.24 seconds
MakeDistcheck                 PASS      179.97 seconds
CheckValgrind                 PASS      254.36 seconds
CheckSmatch                   WARNING   358.99 seconds
bluezmakeextell               PASS      122.74 seconds
IncrementalBuild              PASS      1503.67 seconds
ScanBuild                     PASS      1030.77 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1] shared/bap: Fix overwriting sink attribute WARNING:TYPO_SPELLING: 'overwriten' may be misspelled - perhaps 'overwritten'? #91:
overwriten by source and source_ccc attributes.
^^^^^^^^^^

/github/workspace/src/src/13750084.patch total: 0 errors, 1 warnings, 16 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13750084.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:288: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:288: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:288: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

#2 lore raw
In reply to Luiz Augusto von Dentz
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 7 lines · On Thu, 1 Aug 2024 05:30:10 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

When allocating the sink and sink_ccc attribute they were being overwriten by source and source_ccc attributes.

---
 src/shared/bap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [BlueZ,v1] shared/bap: Fix overwriting sink attribute

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=100c845b2d20

You are awesome, thank you!

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