Go to file
Gustavo A. R. Silva c56967d674 mei: hdcp: Replace one-element array with flexible-array member
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].

Also, make use of the array_size() helper instead of the open-coded
version in memcpy(). These sorts of multiplication factors need to
be wrapped in array_size().

And while there, use the preferred form for passing a size of a struct.
The alternative form where struct name is spelled out hurts readability
and introduces an opportunity for a bug when the pointer variable type is
changed but the corresponding sizeof that is passed as argument is not.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://github.com/KSPP/linux/issues/79

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200722181534.GA31357@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 09:27:09 +02:00
arch A pile of fixes for x86: 2020-07-19 12:16:09 -07:00
block
certs
crypto
Documentation FPGA Manager changes for 5.9-rc1 2020-07-23 09:24:26 +02:00
drivers mei: hdcp: Replace one-element array with flexible-array member 2020-07-23 09:27:09 +02:00
fs More NFS Client Bugfixes for Linux 5.8 2020-07-17 16:37:52 -07:00
include FPGA Manager changes for 5.9-rc1 2020-07-23 09:24:26 +02:00
init
ipc
kernel Two fixes for the timer wheel: 2020-07-19 12:06:08 -07:00
lib
LICENSES
mm
net
samples
scripts soundwire updates for 5.9-rc1 2020-07-23 09:12:15 +02:00
security
sound sound fixes for 5.8-rc6 2020-07-17 08:48:19 -07:00
tools Merge v5.8-rc6 into char-misc-next 2020-07-20 09:43:40 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS soundwire updates for 5.9-rc1 2020-07-23 09:12:15 +02:00
Makefile Linux 5.8-rc6 2020-07-19 15:41:18 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.