diff mbox series

[v2,1/3] lib/uuid: Add support to compare 16bit uuids

Message ID 20240213215703.21507-4-ajay.k.v@intel.com (mailing list archive)
State Accepted
Commit 93d88ecd0714fc32b62109904b5ac7eff1b9aa26
Headers show
Series [v2,1/3] lib/uuid: Add support to compare 16bit uuids | 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 success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Ajay KV Feb. 13, 2024, 9:57 p.m. UTC
---
 lib/uuid.c | 9 +++++++++
 lib/uuid.h | 1 +
 2 files changed, 10 insertions(+)

Comments

bluez.test.bot@gmail.com Feb. 13, 2024, 5:34 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=825718

---Test result---

Test Summary:
CheckPatch                    PASS      0.32 seconds
GitLint                       PASS      0.22 seconds
BuildEll                      PASS      23.96 seconds
BluezMake                     PASS      720.69 seconds
MakeCheck                     PASS      11.31 seconds
MakeDistcheck                 PASS      162.34 seconds
CheckValgrind                 PASS      227.07 seconds
CheckSmatch                   PASS      327.88 seconds
bluezmakeextell               PASS      106.37 seconds
IncrementalBuild              PASS      662.08 seconds
ScanBuild                     PASS      942.33 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Feb. 13, 2024, 8:50 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 Tue, 13 Feb 2024 23:57:01 +0200 you wrote:
> ---
>  lib/uuid.c | 9 +++++++++
>  lib/uuid.h | 1 +
>  2 files changed, 10 insertions(+)

Here is the summary with links:
  - [v2,1/3] lib/uuid: Add support to compare 16bit uuids
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=93d88ecd0714

You are awesome, thank you!
diff mbox series

Patch

diff --git a/lib/uuid.c b/lib/uuid.c
index 1d2e1f7328b8..9a216e7cef60 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -120,6 +120,15 @@  int bt_uuid_cmp(const bt_uuid_t *uuid1, const bt_uuid_t *uuid2)
 	return bt_uuid128_cmp(&u1, &u2);
 }
 
+int bt_uuid16_cmp(const bt_uuid_t *uuid1, uint16_t uuid2)
+{
+
+	if (!uuid1 || (uuid1->type != BT_UUID16))
+		return 0;
+
+	return (uuid1->value.u16 == uuid2);
+}
+
 /*
  * convert the UUID to string, copying a maximum of n characters.
  */
diff --git a/lib/uuid.h b/lib/uuid.h
index 8839dea08140..124e74985a80 100644
--- a/lib/uuid.h
+++ b/lib/uuid.h
@@ -242,6 +242,7 @@  int bt_uuid32_create(bt_uuid_t *btuuid, uint32_t value);
 int bt_uuid128_create(bt_uuid_t *btuuid, uint128_t value);
 
 int bt_uuid_cmp(const bt_uuid_t *uuid1, const bt_uuid_t *uuid2);
+int bt_uuid16_cmp(const bt_uuid_t *uuid1, uint16_t uuid2);
 void bt_uuid_to_uuid128(const bt_uuid_t *src, bt_uuid_t *dst);
 
 #define MAX_LEN_UUID_STR 37