Gustavo A. R. Silva 21face6f0d ARM: integrator: impd1: use struct_size() in devm_kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-01-11 13:33:00 +01:00
2019-01-02 18:49:58 -08:00
2018-12-29 13:03:29 -08:00
2019-01-06 11:40:06 -08:00
2019-01-06 12:21:11 -08:00
2019-01-06 16:33:10 -08:00
2018-10-31 08:54:14 -07:00
2019-01-06 16:33:10 -08:00
2019-01-06 16:33:10 -08:00
2019-01-06 16:33:10 -08:00
2019-01-05 12:48:25 -08:00
2019-01-04 14:27:09 -07:00
2019-01-06 11:40:06 -08:00
2019-01-06 17:08:20 -08:00

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.
Description
No description provided
Readme 5.7 GiB
Languages
C 97.6%
Assembly 1%
Shell 0.5%
Python 0.3%
Makefile 0.3%