aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/vdev_disk.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-01-10 15:14:59 -0500
committerBrian Behlendorf <[email protected]>2023-01-12 15:59:41 -0800
commit8e7ebf4e2d1a7a3d175de54c74869c0d19f290e6 (patch)
treea554af7d118b82729b3dd9597679be17c2ba6cc1 /module/os/linux/zfs/vdev_disk.c
parentc9c3ce79765d2f3c2714281f19dcaf711a090ac2 (diff)
Cleanup: Use C99 flexible array members instead of zero length arrays
The Linux 5.16.14 kernel's coccicheck caught this. The semantic patch that caught it was: ./scripts/coccinelle/misc/flexible_array.cocci The Linux kernel's documentation makes a good case for why we should not use these: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14372
Diffstat (limited to 'module/os/linux/zfs/vdev_disk.c')
-rw-r--r--module/os/linux/zfs/vdev_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c
index 9e330e462..2b5c4956d 100644
--- a/module/os/linux/zfs/vdev_disk.c
+++ b/module/os/linux/zfs/vdev_disk.c
@@ -71,7 +71,7 @@ typedef struct dio_request {
atomic_t dr_ref; /* References */
int dr_error; /* Bio error */
int dr_bio_count; /* Count of bio's */
- struct bio *dr_bio[0]; /* Attached bio's */
+ struct bio *dr_bio[]; /* Attached bio's */
} dio_request_t;
/*