Files
kernel_xiaomi_sm8250/include/net
Arnd Bergmann ee01ac61d1 phonet: fix building with clang
[ Upstream commit 6321aa197547da397753757bd84c6ce64b3e3d89 ]

clang warns about overflowing the data[] member in the struct pnpipehdr:

net/phonet/pep.c:295:8: warning: array index 4 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        if (hdr->data[4] == PEP_IND_READY)
                            ^         ~
include/net/phonet/pep.h:66:3: note: array 'data' declared here
                u8              data[1];

Using a flexible array member at the end of the struct avoids the
warning, but since we cannot have a flexible array member inside
of the union, each index now has to be moved back by one, which
makes it a little uglier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-23 20:09:51 +01:00
..
2018-09-18 19:55:01 -07:00
2019-03-23 20:09:51 +01:00
2018-12-17 09:24:28 +01:00
2018-08-21 12:45:45 -07:00
2019-02-23 09:07:27 +01:00
2018-09-26 20:22:19 -07:00
2018-07-30 09:10:25 -07:00
2018-07-18 15:08:31 -07:00
2019-03-10 07:17:19 +01:00
2019-03-10 07:17:19 +01:00
2018-06-18 22:40:32 +02:00
2018-06-22 13:43:27 +09:00
2018-06-22 13:43:27 +09:00
2019-01-09 17:38:33 +01:00
2018-08-16 14:58:07 -07:00