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>
This commit is contained in:
Yushan Zhou 2022-10-18 18:01:32 +08:00 committed by Jens Axboe
parent e0539ae012
commit 72495b5ab4
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ struct ublk_queue {
bool force_abort; bool force_abort;
unsigned short nr_io_ready; /* how many ios setup */ unsigned short nr_io_ready; /* how many ios setup */
struct ublk_device *dev; struct ublk_device *dev;
struct ublk_io ios[0]; struct ublk_io ios[];
}; };
#define UBLK_DAEMON_MONITOR_PERIOD (5 * HZ) #define UBLK_DAEMON_MONITOR_PERIOD (5 * HZ)