<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/staging/greybus/raw.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/staging/greybus/raw.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/staging/greybus/raw.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2020-02-11T22:04:53Z</updated>
<entry>
<title>staging: greybus: Replace zero-length array with flexible-array member</title>
<updated>2020-02-11T22:04:53Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-11T21:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8acd7c56c1b502b745c7b0dc341abcd1415ba5ad'/>
<id>urn:sha1:8acd7c56c1b502b745c7b0dc341abcd1415ba5ad</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertenly introduced[3] to the codebase from now on.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Link: https://lore.kernel.org/r/20200211211219.GA673@embeddedor
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: greybus: move core include files to include/linux/greybus/</title>
<updated>2019-08-27T17:02:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-25T05:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ec0ad868173da8a75121f9dc116a5d5478ff614d'/>
<id>urn:sha1:ec0ad868173da8a75121f9dc116a5d5478ff614d</id>
<content type='text'>
With the goal of moving the core of the greybus code out of staging, the
include files need to be moved to include/linux/greybus.h and
include/linux/greybus/

Cc: Vaibhav Hiremath &lt;hvaibhav.linux@gmail.com&gt;
Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Vaibhav Agarwal &lt;vaibhav.sr@gmail.com&gt;
Cc: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Cc: David Lin &lt;dtwlin@gmail.com&gt;
Cc: "Bryan O'Donoghue" &lt;pure.logic@nexus-software.ie&gt;
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Alex Elder &lt;elder@kernel.org&gt;
Link: https://lore.kernel.org/r/20190825055429.18547-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: greybus: Remove redundant license text</title>
<updated>2017-11-11T13:46:21Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T13:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=863dbc52e7f0e5acd7b4883f3933543a81c474c7'/>
<id>urn:sha1:863dbc52e7f0e5acd7b4883f3933543a81c474c7</id>
<content type='text'>
Now that the SPDX tag is in all greybus files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Vaibhav Hiremath &lt;hvaibhav.linux@gmail.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Acked-by: Vaibhav Agarwal &lt;vaibhav.sr@gmail.com&gt;
Acked-by: David Lin &lt;dtwlin@gmail.com&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Acked-by: "Bryan O'Donoghue" &lt;pure.logic@nexus-software.ie&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: greybus: add SPDX identifiers to all greybus driver files</title>
<updated>2017-11-11T13:46:20Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T13:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=eb50fd3a22c770f36be275295b782f3ea52e3215'/>
<id>urn:sha1:eb50fd3a22c770f36be275295b782f3ea52e3215</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/staging/greybus files files with the correct SPDX
license identifier based on the license text in the file itself.  The
SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Vaibhav Hiremath &lt;hvaibhav.linux@gmail.com&gt;
Cc: "Bryan O'Donoghue" &lt;pure.logic@nexus-software.ie&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Acked-by: Vaibhav Agarwal &lt;vaibhav.sr@gmail.com&gt;
Acked-by: David Lin &lt;dtwlin@gmail.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Rui Miguel Silva &lt;rmfrfs@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: raw: use hexadecimal notation for request types</title>
<updated>2016-03-03T18:02:48Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-03-02T17:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c7733b6167750a42da81133189e9cca33ce7584f'/>
<id>urn:sha1:c7733b6167750a42da81133189e9cca33ce7584f</id>
<content type='text'>
Use hexadecimal notation for request types in log messages.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
</entry>
<entry>
<title>greybus: raw: convert to bundle driver</title>
<updated>2016-02-15T22:52:24Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-15T05:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=512cc327625651260b2ba885b63cf2cf14ff54d1'/>
<id>urn:sha1:512cc327625651260b2ba885b63cf2cf14ff54d1</id>
<content type='text'>
Convert the legacy raw protocol driver to a bundle driver.

This also fixes a potential crash should a (malicious) module have sent
an early request before the private data had been initialised.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
</entry>
<entry>
<title>greybus: raw: Don't use (possibly) uninitialized raw-&gt;device in gb_raw_receive()</title>
<updated>2016-02-15T22:51:20Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-12T10:38:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2554eda5756a37118ab310bd02de78491303ab5f'/>
<id>urn:sha1:2554eda5756a37118ab310bd02de78491303ab5f</id>
<content type='text'>
If an incoming request comes on the connection, before the driver has
allocated its raw-&gt;device in gb_raw_connection_init(), then it might
result in a crash while printing error messages.

Fix that by using bundle-&gt;dev for printing error messages.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
</entry>
<entry>
<title>greybus: raw: Use consistent label names in connection_init()</title>
<updated>2016-02-15T22:51:20Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-12T10:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c463593c3dbc8d4dcb132538b0116256fa0cc455'/>
<id>urn:sha1:c463593c3dbc8d4dcb132538b0116256fa0cc455</id>
<content type='text'>
Some of the labels are named based on what they are going to undo, while
others are based on where we failed in connection_init().

Follow only the first type of naming.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
</entry>
<entry>
<title>greybus: raw: fix memory leak on disconnect</title>
<updated>2016-02-12T05:46:03Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@hovoldconsulting.com</email>
</author>
<published>2016-02-10T10:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=397d34152423d2ddbff3e48495ef988cbb07776b'/>
<id>urn:sha1:397d34152423d2ddbff3e48495ef988cbb07776b</id>
<content type='text'>
Make sure the class device is freed as well as deregistered on
disconnect.

Also deregister the class device before character device as the former
depends on the latter.

Signed-off-by: Johan Hovold &lt;johan@hovoldconsulting.com&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
</content>
</entry>
<entry>
<title>greybus: raw: use the bundle struct device instead of the connector</title>
<updated>2015-10-15T16:19:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@google.com</email>
</author>
<published>2015-10-14T18:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=29a167ec87fb971931a033766e9e387d0fcabe7d'/>
<id>urn:sha1:29a167ec87fb971931a033766e9e387d0fcabe7d</id>
<content type='text'>
We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the raw driver to use the bundle pointer instead of the
connection pointer.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
</feed>
