Skip to contentSkip to conversation

dm writecache: fix flexible_array.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Feb 10, 2021 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flexible_array.cocci script

:::::: branch date: 2 days ago
:::::: commit date: 4 months ago

 dm-writecache.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-writecache.c +1 -1
@@ -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 {