summaryrefslogtreecommitdiff
path: root/usr/include
AgeCommit message (Collapse)Author
2020-11-17MLK-24874-6: include: uapi: mxc_asrc: fix the UAPI_HEADER_TEST failureJason Liu
Enable CONFIG_UAPI_HEADER_TEST turns out the following build issues HDRTEST usr/include/linux/mxc_asrc.h In file included from <command-line>:32:0: ./usr/include/linux/mxc_asrc.h:125:2: error: unknown type name ‘snd_pcm_format_t’ snd_pcm_format_t input_format; ^~~~~~~~~~~~~~~~ ./usr/include/linux/mxc_asrc.h:126:2: error: unknown type name ‘snd_pcm_format_t’ snd_pcm_format_t output_format; ^~~~~~~~~~~~~~~~ ./usr/include/linux/mxc_asrc.h:134:2: error: unknown type name ‘uint64_t’ uint64_t supported_in_format; ^~~~~~~~ ./usr/include/linux/mxc_asrc.h:135:2: error: unknown type name ‘uint64_t’ uint64_t supported_out_format; But even add the missing/necessary header file, it finally failed too in the end: HDRTEST usr/include/linux/mxc_asrc.h In file included from ./usr/include/linux/mxc_asrc.h:23:0, from <command-line>:32: ./usr/include/sound/asound.h:459:18: error: field ‘trigger_tstamp’ has incomplete type struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ ^~~~~~~~~~~~~~ ./usr/include/sound/asound.h:460:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; /* reference timestamp */ ^~~~~~ ./usr/include/sound/asound.h:469:18: error: field ‘audio_tstamp’ has incomplete type struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */ ^~~~~~~~~~~~ ./usr/include/sound/asound.h:470:18: error: field ‘driver_tstamp’ has incomplete type struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */ ^~~~~~~~~~~~~ ./usr/include/sound/asound.h:472:37: error: invalid application of ‘sizeof’ to incomplete type ‘struct timespec’ unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */ ^~~~~~ ./usr/include/sound/asound.h:479:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; /* Timestamp */ ^~~~~~ ./usr/include/sound/asound.h:481:18: error: field ‘audio_tstamp’ has incomplete type struct timespec audio_tstamp; /* from sample counter or wall clock */ ^~~~~~~~~~~~ ./usr/include/sound/asound.h:651:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; /* Timestamp */ ^~~~~~ ./usr/include/sound/asound.h:763:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; /* Timestamp - last update */ ^~~~~~ ./usr/include/sound/asound.h:813:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; ^~~~~~ ./usr/include/sound/asound.h:956:18: error: field ‘tstamp’ has incomplete type struct timespec tstamp; ^~~~~~ ./usr/include/sound/asound.h:957:36: error: invalid application of ‘sizeof’ to incomplete type ‘struct timespec’ unsigned char reserved[128-sizeof(struct timespec)]; This is kernel known issue, just like other fixes as the following, put mxc_asrc.h into the skip-list: header-test- += sound/asequencer.h header-test- += sound/asoc.h header-test- += sound/asound.h header-test- += sound/compress_offload.h header-test- += sound/emu10k1.h header-test- += sound/sfnt_info.h Signed-off-by: Jason Liu <jason.hui.liu@nxp.com> (cherry picked from commit 4018355af34d9b25ff7bd4d27960d72b8d304e30)
2020-11-17MLK-24874-5: include: uapi: ipu: fix the UAPI_HEADER_TEST failureJason Liu
Enable CONFIG_UAPI_HEADER_TEST turns on the following build issue ./usr/include/linux/ipu.h:167:2: error: unknown type name ‘u32’ u32 x; ^~~ ./usr/include/linux/ipu.h:168:2: error: unknown type name ‘u32’ u32 y; ^~~ ./usr/include/linux/ipu.h:173:2: error: unknown type name ‘u32’ u32 w; ^~~ ./usr/include/linux/ipu.h:174:2: error: unknown type name ‘u32’ u32 h; ^~~ ./usr/include/linux/ipu.h:179:2: error: unknown type name ‘u8’ u8 motion; /*see ipu_motion_sel*/ The fix is to use the __u32/__u8 instead and remove the internal definiton But it finally will result in another failure as the followings: HDRTEST usr/include/linux/ipu.h In file included from ./usr/include/linux/ipu.h:29:0, from <command-line>:32: ./usr/include/linux/videodev2.h:2353:20: error: field ‘timestamp’ has incomplete type struct timespec timestamp; This is kernel known issue. The fix is as others by adding the ipu.h to skip-list: header-test- += linux/v4l2-mediabus.h header-test- += linux/v4l2-subdev.h header-test- += linux/videodev2.h Signed-off-by: Jason Liu <jason.hui.liu@nxp.com> (cherry picked from commit 24c36527086fff43595bde2822f8277138ebcb55)
2020-11-17MLK-24874-1: include: uapi: fmd: fix the UAPI_HEADER_TEST/install failureJason Liu
Enable CONFIG_UAPI_HEADER_TEST or make headers_install result in build issues: include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h: leak CONFIG_COMPAT to user-space include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h: leak CONFIG_COMPAT to user-space include/uapi/linux/fmd/Peripherals/fm_ioctls.h: leak CONFIG_COMPAT to user-space The comments from DN fix of the fmd related failure is to add to the skip-list due to the historial reasons from DN(Layerscape) drivers - to avoid break the legacy users Signed-off-by: Jason Liu <jason.hui.liu@nxp.com> (cherry picked from commit 569d6d3cc2a664de66ee980bd611687f4d785b4e)
2020-03-12kbuild: fix 'No such file or directory' warning when cleaningMasahiro Yamada
[ Upstream commit cf6b58ab2d55f5a143c88c219c8e66ff0720fa69 ] Since commit fcbb8461fd23 ("kbuild: remove header compile test"), 'make clean' with O= option in the pristine source tree emits 'No such file or directory' warning. $ git clean -d -f -x $ make O=foo clean make[1]: Entering directory '/home/masahiro/linux/foo' find: ‘usr/include’: No such file or directory make[1]: Leaving directory '/home/masahiro/linux/foo' Fixes: fcbb8461fd23 ("kbuild: remove header compile test") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-05kbuild: move headers_check rule to usr/include/MakefileMasahiro Yamada
commit 7ecaf069da52e472d393f03e79d721aabd724166 upstream. Currently, some sanity checks for uapi headers are done by scripts/headers_check.pl, which is wired up to the 'headers_check' target in the top Makefile. It is true compiling headers has better test coverage, but there are still several headers excluded from the compile test. I like to keep headers_check.pl for a while, but we can delete a lot of code by moving the build rule to usr/include/Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-05kbuild: remove header compile testMasahiro Yamada
commit fcbb8461fd2376ba3782b5b8bd440c929b8e4980 upstream. There are both positive and negative options about this feature. At first, I thought it was a good idea, but actually Linus stated a negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it is ugly and annoying. The baseline I'd like to keep is the compile-test of uapi headers. (Otherwise, kernel developers have no way to ensure the correctness of the exported headers.) I will maintain a small build rule in usr/include/Makefile. Remove the other header test functionality. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [ added to 5.4.y due to start of build warnings from backported patches because of this feature - gregkh] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-05kbuild: update compile-test header list for v5.4-rc2Masahiro Yamada
Commit 6dc280ebeed2 ("coda: remove uapi/linux/coda_psdev.h") removed a header in question. Some more build errors were fixed. Add more headers into the test coverage. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-09-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netLinus Torvalds
Pull networking fixes from David Miller: 1) Sanity check URB networking device parameters to avoid divide by zero, from Oliver Neukum. 2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6 don't work properly. Longer term this needs a better fix tho. From Vijay Khemka. 3) Small fixes to selftests (use ping when ping6 is not present, etc.) from David Ahern. 4) Bring back rt_uses_gateway member of struct rtable, it's semantics were not well understood and trying to remove it broke things. From David Ahern. 5) Move usbnet snaity checking, ignore endpoints with invalid wMaxPacketSize. From Bjørn Mork. 6) Missing Kconfig deps for sja1105 driver, from Mao Wenan. 7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel, Alex Vesker, and Yevgeny Kliteynik 8) Missing CAP_NET_RAW checks in various places, from Ori Nimron. 9) Fix crash when removing sch_cbs entry while offloading is enabled, from Vinicius Costa Gomes. 10) Signedness bug fixes, generally in looking at the result given by of_get_phy_mode() and friends. From Dan Crapenter. 11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet. 12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern. 13) Fix quantization code in tcp_bbr, from Kevin Yang. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits) net: tap: clean up an indentation issue nfp: abm: fix memory leak in nfp_abm_u32_knode_replace tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state sk_buff: drop all skb extensions on free and skb scrubbing tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions Documentation: Clarify trap's description mlxsw: spectrum: Clear VLAN filters during port initialization net: ena: clean up indentation issue NFC: st95hf: clean up indentation issue net: phy: micrel: add Asym Pause workaround for KSZ9021 net: socionext: ave: Avoid using netdev_err() before calling register_netdev() ptp: correctly disable flags on old ioctls lib: dimlib: fix help text typos net: dsa: microchip: Always set regmap stride to 1 nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled net: sched: sch_sfb: don't call qdisc_put() while holding tree lock ...
2019-09-25netfilter: ebtables: use __u8 instead of uint8_t in uapi headerMasahiro Yamada
When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, linux/netfilter_bridge/ebtables.h is excluded from the test coverage. To make it join the compile-test, we need to fix the build errors attached below. For a case like this, we decided to use __u{8,16,32,64} variable types in this discussion: https://lkml.org/lkml/2019/6/5/18 Build log: CC usr/include/linux/netfilter_bridge/ebtables.h.s In file included from <command-line>:32:0: ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’ uint8_t revision; ^~~~~~~ Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2019-08-29kbuild: remove clean-dirs syntaxMasahiro Yamada
The only the difference between clean-files and clean-dirs is the -r option passed to the 'rm' command. You can always pass -r, and then remove the clean-dirs syntax. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-23kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header testHeiko Carstens
Masahiro Yamada changed the zcrypt.h header file to use __u{16,32,64} instead of uint{16,32,64}_t with ("s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header"). This makes all s390 header files pass - remove zcrypt.h from the blacklist. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2019-07-20kbuild: update compile-test header list for v5.3-rc1Masahiro Yamada
- Some headers graduated from the blacklist - hyperv_timer.h joined the header-test when CONFIG_X86=y - nf_tables*.h joined the header-test when CONFIG_NF_TABLES is enabled. - The entry for nf_tables_offload.h was added to fix build error for the combination of CONFIG_NF_TABLES=n and CONFIG_KERNEL_HEADER_TEST=y. - The entry for iomap.h was added because this header is supposed to be included only when CONFIG_BLOCK=y Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-08kbuild: compile-test exported headers to ensure they are self-containedMasahiro Yamada
Multiple people have suggested compile-testing UAPI headers to ensure they can be really included from user-space. "make headers_check" is obviously not enough to catch bugs, and we often leak unresolved references to user-space. Use the new header-test-y syntax to implement it. Please note exported headers are compile-tested with a completely different set of compiler flags. The header search path is set to $(objtree)/usr/include since exported headers should not include unexported ones. We use -std=gnu89 for the kernel space since the kernel code highly depends on GNU extensions. On the other hand, UAPI headers should be written in more standardized C, so they are compiled with -std=c90. This will emit errors if C++ style comments, the keyword 'inline', etc. are used. Please use C style comments (/* ... */), '__inline__', etc. in UAPI headers. There is additional compiler requirement to enable this test because many of UAPI headers include <stdlib.h>, <sys/ioctl.h>, <sys/time.h>, etc. directly or indirectly. You cannot use kernel.org pre-built toolchains [1] since they lack <stdlib.h>. I reused CONFIG_CC_CAN_LINK to check the system header availability. The intention is slightly different, but a compiler that can link userspace programs provide system headers. For now, a lot of headers need to be excluded because they cannot be compiled standalone, but this is a good start point. [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/index.html Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>