From: Jakub Kicinski <kuba@kernel.org>
To: YANG LI <abaci-bugfix@linux.alibaba.com>
Cc: davem@davemloft.net, tariqt@nvidia.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
andrii@kernel.org, kafai@fb.com, songliubraving@fb.com,
yhs@fb.com, kpsingh@kernel.org, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH] mlx4: style: replace zero-length array with flexible-array member.
Date: Mon, 4 Jan 2021 12:40:44 -0800 [thread overview]
Message-ID: <20210104124044.2e0a62ee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <1609309731-70464-1-git-send-email-abaci-bugfix@linux.alibaba.com>
On Wed, 30 Dec 2020 14:28:51 +0800 YANG LI wrote:
> There is a regular need in the kernel to provide a way to declare
> having a dynamically sized set of trailing elements in a structure.
> Kernel code should always use "flexible array members"[1] for these
> cases. The older style of one-element or zero-length arrays should
> no longer be used[2].
>
> [1] https://en.wikipedia.org/wiki/Flexible_array_member
> [2] https://www.kernel.org/doc/html/v5.9/process/
> deprecated.html#zero-length-and-one-element-arrays
>
> Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
> Reported-by: Abaci <abaci@linux.alibaba.com>
This breaks the build with allmodconfig, could you double check?
Are there dependencies?
In file included from drivers/net/ethernet/mellanox/mlx4/en_netdev.c:50:
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h:316:27: error: flexible array member in a struct with no named members
316 | struct mlx4_wqe_data_seg data[];
| ^~~~
prev parent reply other threads:[~2021-01-04 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 6:28 [PATCH] mlx4: style: replace zero-length array with flexible-array member YANG LI
2020-12-30 9:37 ` Tariq Toukan
2020-12-30 13:05 ` kernel test robot
2021-01-04 20:40 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210104124044.2e0a62ee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=tariqt@nvidia.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.