diff options
author | Yushan Zhou <katrinzhou@tencent.com> | 2022-10-18 13:01:32 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-20 04:27:23 +0300 |
commit | 72495b5ab456ec9f05d587238d1e2fa8e9ea63ec (patch) | |
tree | 622b0c18c87185d0c84c0ed3247ede4c123cd9d2 /drivers/block | |
parent | e0539ae012ba5d618eb19665ff990b87b960c643 (diff) | |
download | linux-72495b5ab456ec9f05d587238d1e2fa8e9ea63ec.tar.xz |
ublk_drv: use flexible-array member instead of zero-length array
Eliminate the following coccicheck warning:
./drivers/block/ublk_drv.c:127:16-19: WARNING use flexible-array member instead
Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
Link: https://lore.kernel.org/r/20221018100132.355393-1-zys.zljxml@gmail.com
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ublk_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 2651bf41dde3..5afce6ffaadf 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -124,7 +124,7 @@ struct ublk_queue { bool force_abort; unsigned short nr_io_ready; /* how many ios setup */ struct ublk_device *dev; - struct ublk_io ios[0]; + struct ublk_io ios[]; }; #define UBLK_DAEMON_MONITOR_PERIOD (5 * HZ) |