Skip to content

Commit e54fd07

Browse files
YANG LIsmfrench
authored andcommitted
cifs: style: replace one-element array with flexible-array
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"[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/ deprecated.html#zero-length-and-one-element-arrays Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com> Reported-by: Abaci <abaci@linux.alibaba.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent ed6b192 commit e54fd07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/cifs/smb2pdu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ struct smb2_rdma_transform_capabilities_context {
424424
__le16 TransformCount;
425425
__u16 Reserved1;
426426
__u32 Reserved2;
427-
__le16 RDMATransformIds[1];
427+
__le16 RDMATransformIds[];
428428
} __packed;
429429

430430
/* Signing algorithms */

0 commit comments

Comments
 (0)