Bluetooth: Fix code style error
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 Bluetooth: Fix code style error
checkpatch.pl flags the zero-length array members in struct qca_dump_hdr:
ERROR: Use C99 flexible arrays - see https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
#3110: FILE: drivers/bluetooth/btusb.c:3110:
+ u8 data0[0];
Replace them them with DECLARE_FLEX_ARRAY(), since C99 flexible array members are not permitted inside unions or as the sole member of a struct.
The struct layout is unchanged, and everything compiles with the change.
--- drivers/bluetooth/btusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btusb.c +2 -2
@@ -3103,10 +3103,10 @@ struct qca_dump_hdr {__le16 seqno;u8 reserved;union { -u8 data[0 ]; + DECLARE_FLEX_ARRAY(u8, data);struct {__le32 ram_dump_size; -u8 data0[0 ]; + DECLARE_FLEX_ARRAY(u8, data0); } __packed; }; } __packed;
Signature · 1 line
2.43.0
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=1151226
---Test result---
Test Summary:
CheckPatch FAIL 0.59 seconds VerifyFixes PASS 0.09 seconds VerifySignedoff PASS 0.09 seconds GitLint PASS 0.23 seconds SubjectPrefix PASS 0.08 seconds BuildKernel PASS 27.21 seconds CheckAllWarning PASS 30.52 seconds CheckSparse PASS 28.82 seconds BuildKernel32 PASS 26.40 seconds CheckKernelLLVM SKIP 0.00 seconds TestRunnerSetup PASS 501.38 seconds IncrementalBuild PASS 26.29 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2] Bluetooth: Fix code style error
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#103:
ERROR: Use C99 flexible arrays - see https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
WARNING: Possible repeated word: 'them'
#107:
Replace them them with DECLARE_FLEX_ARRAY(), since C99 flexible array
total: 0 errors, 2 warnings, 12 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/patch/14766286.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis Output:
Clang not found
https://github.com/bluez/bluetooth-next/pull/649
---
Regards,
Linux Bluetooth