LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: max310x: fix flexible_array.cocci warnings
@ 2021-03-08 17:47 Julia Lawall
  2021-03-09 14:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2021-03-08 17:47 UTC (permalink / raw
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: linux-serial, linux-kernel, Denis Efremov, 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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script")
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>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   144c79ef33536b4ecb4951e07dbc1f2b7fa99d32
commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flexible_array.cocci script
:::::: branch date: 6 hours ago
:::::: commit date: 5 months ago

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

--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -273,7 +273,7 @@ struct max310x_port {
 #ifdef CONFIG_GPIOLIB
 	struct gpio_chip	gpio;
 #endif
-	struct max310x_one	p[0];
+	struct max310x_one	p[];
 };

 static struct uart_driver max310x_uart = {

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

* Re: [PATCH] tty: max310x: fix flexible_array.cocci warnings
  2021-03-08 17:47 [PATCH] tty: max310x: fix flexible_array.cocci warnings Julia Lawall
@ 2021-03-09 14:04 ` Greg Kroah-Hartman
  2021-03-09 14:11   ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-03-09 14:04 UTC (permalink / raw
  To: Julia Lawall
  Cc: Jiri Slaby, linux-serial, linux-kernel, Denis Efremov, kbuild-all

On Mon, Mar 08, 2021 at 06:47:19PM +0100, Julia Lawall wrote:
> 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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script")

This can't be true, as the driver code did not change for that commit :(

Can you provide the commit where the driver itself caused the problem?

thanks,

greg k-h

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

* Re: [PATCH] tty: max310x: fix flexible_array.cocci warnings
  2021-03-09 14:04 ` Greg Kroah-Hartman
@ 2021-03-09 14:11   ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2021-03-09 14:11 UTC (permalink / raw
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, linux-serial, linux-kernel, Denis Efremov, kbuild-all



On Tue, 9 Mar 2021, Greg Kroah-Hartman wrote:

> On Mon, Mar 08, 2021 at 06:47:19PM +0100, Julia Lawall wrote:
> > 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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script")
>
> This can't be true, as the driver code did not change for that commit :(
>
> Can you provide the commit where the driver itself caused the problem?

Sorry, 0-day seems to have a problem for the subject lines in some cases,
and it seems that it has a problem for the Fixes lines as well.  I will
find the proper one.

julia

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

end of thread, other threads:[~2021-03-09 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08 17:47 [PATCH] tty: max310x: fix flexible_array.cocci warnings Julia Lawall
2021-03-09 14:04 ` Greg Kroah-Hartman
2021-03-09 14:11   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).