All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings
@ 2021-02-13 20:09 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2021-02-13 20:09 UTC (permalink / raw)
  To: Peter Geis, Greg Kroah-Hartman, Dmitry Osipenko, Peter Chen,
	linux-usb, linux-kernel
  Cc: linux-usb, kbuild-all

From: kernel test robot <lkp@intel.com>

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 <pgwipeout@gmail.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>

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
head:   7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7
commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode
:::::: branch date: 19 hours ago
:::::: commit date: 4 weeks ago

 host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings
@ 2021-02-13 20:09 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2021-02-13 20:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

From: kernel test robot <lkp@intel.com>

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 <pgwipeout@gmail.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>

---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
head:   7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7
commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode
:::::: branch date: 19 hours ago
:::::: commit date: 4 weeks ago

 host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings
  2021-02-13 20:09 ` Julia Lawall
  (?)
@ 2021-02-25  5:24 ` Dmitry Osipenko
  -1 siblings, 0 replies; 4+ messages in thread
From: Dmitry Osipenko @ 2021-02-25  5:24 UTC (permalink / raw)
  To: Julia Lawall, Peter Geis, Greg Kroah-Hartman, Peter Chen,
	linux-usb, linux-kernel
  Cc: kbuild-all

13.02.2021 23:09, Julia Lawall пишет:
> From: kernel test robot <lkp@intel.com>
> 
> 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 <pgwipeout@gmail.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>
> 
> ---
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
> head:   7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7
> commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode
> :::::: branch date: 19 hours ago
> :::::: commit date: 4 weeks ago
> 
>  host.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- 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)
> 

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings
  2021-02-12  8:14 [usb:usb-next 64/198] drivers/usb/chipidea/host.c:35:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
@ 2021-02-12  8:14 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-02-12  8:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-usb(a)vger.kernel.org
TO: Peter Geis <pgwipeout@gmail.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Dmitry Osipenko <digetx@gmail.com>
CC: Peter Chen <Peter.Chen@nxp.com>
CC: linux-usb(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/usb/chipidea/host.c:35:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)


 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 <pgwipeout@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
head:   7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7
commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode
:::::: branch date: 19 hours ago
:::::: commit date: 4 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-25  5:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-13 20:09 [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings Julia Lawall
2021-02-13 20:09 ` Julia Lawall
2021-02-25  5:24 ` Dmitry Osipenko
  -- strict thread matches above, loose matches on Subject: below --
2021-02-12  8:14 [usb:usb-next 64/198] drivers/usb/chipidea/host.c:35:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-02-12  8:14 ` [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.