summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-writecache.c
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@inria.fr>2021-02-10 21:06:15 +0100
committerMike Snitzer <snitzer@redhat.com>2021-03-26 19:53:41 +0100
commitc40819f267f76e69418d3bc9fbb57962a6845673 (patch)
tree423e30b065d13c44400f2b7c87b8291c1eac61b5 /drivers/md/dm-writecache.c
parentdm ioctl: fix out of bounds array access when no devices (diff)
downloadlinux-c40819f267f76e69418d3bc9fbb57962a6845673.tar.xz
linux-c40819f267f76e69418d3bc9fbb57962a6845673.zip
dm writecache: fix flexible_array.cocci warnings
Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci CC: Denis Efremov <efremov@linux.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-writecache.c')
-rw-r--r--drivers/md/dm-writecache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 4f72b6f66c3a..aecc246ade26 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -73,7 +73,7 @@ struct wc_memory_superblock {
};
__le64 padding[8];
};
- struct wc_memory_entry entries[0];
+ struct wc_memory_entry entries[];
};
struct wc_entry {