2022-01-14 23:11:25

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] monitor/avctp: Fix parsing of GetElementAttribute

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

AVRCP byte order is always big endian:

Audio/Video Remote Control / Profile Specification - Page 20:

'Transfer Octet Order; Packets shall transfer multiple-octet fields in
standard network octet order (Big Endian), with more significant
(high-order) octets being transferred before less-significant (low-order)
octets.'
---
monitor/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/avctp.c b/monitor/avctp.c
index dc03195a8..fb2628282 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -1192,7 +1192,7 @@ static bool avrcp_get_element_attributes(struct avctp_frame *avctp_frame,
for (; num > 0; num--) {
uint32_t attr;

- if (!l2cap_frame_get_le32(frame, &attr))
+ if (!l2cap_frame_get_be32(frame, &attr))
return false;

print_field("%*cAttributeID: 0x%08x (%s)", (indent - 8),
--
2.33.1


2022-01-15 07:35:16

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,1/2] monitor/avctp: Fix parsing of GetElementAttribute

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

---Test result---

Test Summary:
CheckPatch FAIL 3.24 seconds
GitLint PASS 2.01 seconds
Prep - Setup ELL PASS 42.16 seconds
Build - Prep PASS 0.74 seconds
Build - Configure PASS 8.34 seconds
Build - Make PASS 1258.23 seconds
Make Check PASS 11.72 seconds
Make Check w/Valgrind PASS 437.37 seconds
Make Distcheck PASS 227.87 seconds
Build w/ext ELL - Configure PASS 8.47 seconds
Build w/ext ELL - Make PASS 1256.72 seconds
Incremental Build with patchesPASS 2518.42 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
[BlueZ,2/2] avrcp: Fix unaligned access
WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
#111: FILE: profiles/audio/avrcp.c:940:
+} __attribute__ ((packed));

/github/workspace/src/12714173.patch total: 0 errors, 1 warnings, 747 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/12714173.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.




---
Regards,
Linux Bluetooth