linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluetooth: mgmt: Replace zero-length array with flexible-array member
@ 2022-01-21  1:35 cgel.zte
  2022-01-21  1:56 ` bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: cgel.zte @ 2022-01-21  1:35 UTC (permalink / raw)
  To: marcel
  Cc: johan.hedberg, luiz.dentz, davem, kuba, linux-bluetooth, netdev,
	linux-kernel, Changcheng Deng, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members" for these cases. The older
style of one-element or zero-length arrays should no longer be used.
Reference:
https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 include/net/bluetooth/mgmt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 99266f7aebdc..3d26e6a3478b 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -1112,7 +1112,7 @@ struct mgmt_ev_adv_monitor_device_found {
 	__s8   rssi;
 	__le32 flags;
 	__le16 eir_len;
-	__u8   eir[0];
+	__u8   eir[];
 } __packed;
 
 #define MGMT_EV_ADV_MONITOR_DEVICE_LOST		0x0030
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: bluetooth: mgmt: Replace zero-length array with flexible-array member
  2022-01-21  1:35 [PATCH] bluetooth: mgmt: Replace zero-length array with flexible-array member cgel.zte
@ 2022-01-21  1:56 ` bluez.test.bot
  2022-02-01 20:25   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2022-01-21  1:56 UTC (permalink / raw)
  To: linux-bluetooth, cgel.zte

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    FAIL      1.61 seconds
GitLint                       FAIL      0.96 seconds
SubjectPrefix                 FAIL      0.87 seconds
BuildKernel                   PASS      30.32 seconds
BuildKernel32                 PASS      26.97 seconds
Incremental Build with patchesPASS      36.33 seconds
TestRunner: Setup             PASS      472.13 seconds
TestRunner: l2cap-tester      PASS      13.23 seconds
TestRunner: bnep-tester       PASS      6.01 seconds
TestRunner: mgmt-tester       PASS      103.93 seconds
TestRunner: rfcomm-tester     PASS      7.33 seconds
TestRunner: sco-tester        PASS      7.60 seconds
TestRunner: smp-tester        PASS      7.47 seconds
TestRunner: userchan-tester   PASS      6.25 seconds

Details
##############################
Test: CheckPatch - FAIL - 1.61 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
bluetooth: mgmt: Replace zero-length array with flexible-array member\WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#88: 
https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

total: 0 errors, 1 warnings, 8 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/12719219.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: GitLint - FAIL - 0.96 seconds
Run gitlint with rule in .gitlint
bluetooth: mgmt: Replace zero-length array with flexible-array member
10: B1 Line exceeds max length (97>80): "https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays"


##############################
Test: SubjectPrefix - FAIL - 0.87 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bluetooth: mgmt: Replace zero-length array with flexible-array member
  2022-01-21  1:56 ` bluez.test.bot
@ 2022-02-01 20:25   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-01 20:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: cgel.zte

Hi,

On Fri, Jan 21, 2022 at 4:29 PM <bluez.test.bot@gmail.com> wrote:
>
> 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=607119
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    FAIL      1.61 seconds
> GitLint                       FAIL      0.96 seconds
> SubjectPrefix                 FAIL      0.87 seconds
> BuildKernel                   PASS      30.32 seconds
> BuildKernel32                 PASS      26.97 seconds
> Incremental Build with patchesPASS      36.33 seconds
> TestRunner: Setup             PASS      472.13 seconds
> TestRunner: l2cap-tester      PASS      13.23 seconds
> TestRunner: bnep-tester       PASS      6.01 seconds
> TestRunner: mgmt-tester       PASS      103.93 seconds
> TestRunner: rfcomm-tester     PASS      7.33 seconds
> TestRunner: sco-tester        PASS      7.60 seconds
> TestRunner: smp-tester        PASS      7.47 seconds
> TestRunner: userchan-tester   PASS      6.25 seconds
>
> Details
> ##############################
> Test: CheckPatch - FAIL - 1.61 seconds
> Run checkpatch.pl script with rule in .checkpatch.conf
> bluetooth: mgmt: Replace zero-length array with flexible-array member\WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
> #88:
> https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays
>
> total: 0 errors, 1 warnings, 8 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/12719219.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: GitLint - FAIL - 0.96 seconds
> Run gitlint with rule in .gitlint
> bluetooth: mgmt: Replace zero-length array with flexible-array member
> 10: B1 Line exceeds max length (97>80): "https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays"
>
>
> ##############################
> Test: SubjectPrefix - FAIL - 0.87 seconds
> Check subject contains "Bluetooth" prefix
> "Bluetooth: " is not specified in the subject
>
>
>
> ---
> Regards,
> Linux Bluetooth

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-01 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21  1:35 [PATCH] bluetooth: mgmt: Replace zero-length array with flexible-array member cgel.zte
2022-01-21  1:56 ` bluez.test.bot
2022-02-01 20:25   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).