From: kernel test robot Date: Sat, 13 Feb 2021 20:09:55 +0000 (+0100) Subject: usb: chipidea: tegra: fix flexible_array.cocci warnings X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4294a8c2b8db914b029801cf2a2ba438e8785714;p=linux.git usb: chipidea: tegra: 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 Fixes: fc53d5279094 ("usb: chipidea: tegra: Support host mode") CC: Peter Geis Reported-by: kernel test robot Reviewed-by: Dmitry Osipenko Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2102132108040.2720@hadrien Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 67247d2ac07a8..e86d13c04bdbe 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -32,7 +32,7 @@ struct ehci_ci_priv { struct ci_hdrc_dma_aligned_buffer { void *kmalloc_ptr; void *old_xfer_buffer; - u8 data[0]; + u8 data[]; }; static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)